Ugent!! How can I use Runtime.exec() to start a program in solaris?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jack_Zhuo
Posted On:   Monday, August 27, 2001 11:58 PM

My program code is: ****************************** String[] cmdline = new String[6]; cmdline[0] = "/usr/java1.3/bin/java"; //JVM for Solaris //cmdline[0] = "C:\jdk1.3\bin\javaw.exe"; //JVM for NT cmdline[1] = "-classpath"; cmdline[2] = classPath; //ClassPath String cmdline[3] = startupClass; //Java Application Class Name cmdline[4] = param1; //Parameter 1 String cmdline[5] = param2; //Parameter 2 String Process proc = Runtime.getRuntime.exec(cmdline); ****************************** It can work on NT platform, but can not work on Solaris.    More>>

My program code is:
******************************
String[] cmdline = new String[6];
cmdline[0] = "/usr/java1.3/bin/java"; //JVM for Solaris
//cmdline[0] = "C:\jdk1.3\bin\javaw.exe"; //JVM for NT
cmdline[1] = "-classpath";
cmdline[2] = classPath; //ClassPath String
cmdline[3] = startupClass; //Java Application Class Name
cmdline[4] = param1; //Parameter 1 String
cmdline[5] = param2; //Parameter 2 String

Process proc = Runtime.getRuntime.exec(cmdline);
******************************

It can work on NT platform, but can not work on Solaris.

   <<Less

I get it!!!

Posted By:   Jack_Zhuo  
Posted On:   Tuesday, August 28, 2001 12:40 AM

The usage is OK, but I set a wrong classpath.
About | Sitemap | Contact