• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Running a Runnable Jar File on Server

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Won't you be my neighbor? - Fred Rogers. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic