| Author |
runtime.exec in linux
|
lavnish lalchandani
Ranch Hand
Joined: Feb 28, 2007
Posts: 78
|
|
hi i have a java code , running on linux , Runtime.exec("java -classpath /usr/home/App1/ViewController/classes;/usr/home/lib/abc.jar model.demo.Arguments user1 user2 user3"); ON running the above i get error java.lang.ClassNotFoundException user1 Arguments.class is in folder /usr/home/App1/ViewController/classes/model/demo Arguments.java has package model.demo ??? Am i giving something wrong ??
|
lavnish.blogspot.com
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Yep, If you want to pass multiple arguments to a command look at the exec(String[]) method. http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#exec(java.lang.String[])
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Also, if you're running Java 1.5 or higher, you might want to take a look at the newer ProcessBuilder class: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html
|
 |
 |
|
|
subject: runtime.exec in linux
|
|
|