| Author |
Running a Runnable Jar File on Server
|
Maya sekar
Ranch Hand
Joined: Sep 22, 2011
Posts: 70
|
|
Hi,
I need to run my runnable Jar file on a Web Server. Once the Server is started, the main class should be called. How do I do that?
Many Thanks
Have a nice day
|
 |
gurpeet singh
Ranch Hand
Joined: Apr 04, 2012
Posts: 892
|
|
Maya sekar wrote:Hi,
I need to run my runnable Jar file on a Web Server. Once the Server is started, the main class should be called. How do I do that?
Many Thanks
Have a nice day
How can you run a jar file on a web server. jar file is just a java archive containing object code. is it like that you have a war file which wants to call jar application. please be more clear?
|
OCPJP 6(100 %) OCEWCD 6(91 %)
|
 |
Maya sekar
Ranch Hand
Joined: Sep 22, 2011
Posts: 70
|
|
Hi Gurpreet,
Thank you for your response. I need a jar file packed along with my war file.... a jar that has a main class i.e a runnable jar file.. once the server is started, the main class needs to load and run...
Many thanks...
Have a nice day
|
 |
gurpeet singh
Ranch Hand
Joined: Apr 04, 2012
Posts: 892
|
|
|
you can write a shell script if you are using linux or you can write batch file if you have windows system. this script can start your jar file whenever the server is started.
|
 |
Maya sekar
Ranch Hand
Joined: Sep 22, 2011
Posts: 70
|
|
Hi Gurpreet ,
Thank you for the response. I did think of that. But you see I need it to be independent of the Operating System. So neither a shell script nor a windows scheduler is an option....
thanks again,
Have a nice day
|
 |
 |
|
|
subject: Running a Runnable Jar File on Server
|
|
|