hi,

This is the error i got hwen i tried to run a class from jsp page using

<%
String path=System.getProperty("java.class.path");
 Runtime r = Runtime.getRuntime();
r.exec("c:/jdk1.2.2/bin/java -classpath
"+path+";d:/Progra~1/Apache~1/Apache/htdocs/images/weatherjavaf");
%>

can anyone help.

thanx
Kishor

java.io.IOException: CreateProcess: c:/jdk1.2.2/bin/java -classpath
..\classes;..\lib\webserver.jar;..\lib\jasper.jar;..\lib\xml.jar;..\lib\serv
let.jar;\lib\tools.jar;.;d:\JDK1.2.2\BIN;d:\JDK1.2.2\LIB;c:\JSDK2.0\BIN;C:\J
SDK2.0\LIB;d:\jdk1.2.2\lib\tools.jar;D:\jakarta-tomcat\webapps\root;d:\progr
a~1\apache~1\apache\htdocs\spanie~1;D:\jakarta-tomcat\webapps\root\jsp;d:/Pr
ogra~1/Apache~1/Apache/htdocs/images/weatherjavaf  error=3
 at java.lang.Win32Process.create(Native Method)
 at java.lang.Win32Process.(Win32Process.java:64)
 at java.lang.Runtime.execInternal(Native Method)
 at java.lang.Runtime.exec(Runtime.java:272)
 at java.lang.Runtime.exec(Runtime.java:195)
 at java.lang.Runtime.exec(Runtime.java:152)
 at
_0002fweatherindia_0002ejspweatherindia_jsp_14._jspService(_0002fweatherindi
a_0002ejspweatherindia_jsp_14.java:74)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va, Compiled Code)
 at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java,
Compiled Code)
 at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled
Code)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
 at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java, Compiled Code)
 at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
Compiled Code)
 at java.lang.Thread.run(Thread.java, Compiled Code)


----- Original Message -----
From: "Santiago Benito Rebollo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 02, 2000 11:04 PM
Subject: Re: Execute aplication in other process


> Ohhhhh yeahh
> OK. I make that it works but the I found another problem. I need to run
> class form another directories, and I have to put in the call the
classpath
> of the class that I want to run.
> I make that it works in this way:
>
> public static void main(String args[]) {
>
>                         Runtime runtime = Runtime.getRuntime();
>                         Process process = null;
>                         String Str_argumentos = "";
>
>
Str_argumentos=System.getProperty("java.class.path");
>
>                         try {
>
>                                         process =
runtime.exec("c:/jdk1.2.2/bin/java -classpath
> "+Str_argumentos+";C:/Temporal/ProcesosBatch Mensajeria");
>
>                                         DataInputStream in = new
DataInputStream
> (process.getInputStream());
>                                         String line=null;
>                                         while ((line=in.readLine()) !=
null) {
>                                                 System.out.println (line);
>                                         }
>                         }
>                                 catch (Exception e) {
>
>                                         System.out.println ("No puedo
ejecutar la tarea: ");
>
>                                         System.out.println (e);
>
>
>                                 }
>
>         }//
>
>
> Thanks
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to