A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Joined: Feb 06, 2012
Apr 05, 2013 00:09:12
I am trying to invoke a Jar file, with command line arguments to the main() method in that Jar file.
So here is the command i am trying to execute
command = "java lib\test.jar com.test.Test 1234";
But that particular jar file is not started after executing the above command.
Please correct me if anything is wrong in this?
Joined: Aug 27, 2012
Apr 05, 2013 00:35:56
that command on the command line because I would not expect it to work if you are expecting to execute the class com.test.Test located in the jar file.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Apr 05, 2013 07:28:23
Specifying the class location that way means you are dependent on your current directory having the "lib" subdirectory.
Why not specify the absolute location?
I agree. Here's the link:
subject: Using Runtime.exec()
Creating a Jar from other Jar files
Run jar file
Problem with jar
i am facing problem in creating jar file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015