Hi there, I'm new to Jar files and I've scoured the net for the answer to this question.
My jar has many class files and 3 main methods in total. I want to know if I can run a specific main method from a class inside a jar. The jar does not have a manifest file. The main method is chosen to run from another program at run time.
Spot on Ernest! That works beauitifully!!! Hooray! Damn jar files!
Ali, the reason that I need more than one main method is because the java that I' writing is the backend to a VB front end, so I need different things to happen in the backend when buttons are pushed. I'm still investigating the posibility of having a thread or something listening for the buttons but I haven't got there yet. As for why the front end in VB - I don't know, I just do what I'm told!
Thanks guys! Rachel
posted 14 years ago
Hey there, I found a different problem that I have now. When I run the command from the command line, it works only if I execute the cmd from the same folder that it is stored in. Problem is that I need to call the cmd from 2 folders above it.
Meaning that my jar is in \ss\server\lib but I want to run the command from \ss\
As long as you include the full path to the jar file on the command line, it should work fine from anywhere (unless, of course, the app is written to expect some other files in the current directory -- but that's a separate discussion.)