File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running a Runnable Jar File on Server

 
Maya sekar
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 924
1
Fedora Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Maya sekar
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 924
1
Fedora Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic