Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

running application with double click

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

so far, all my applications are running through the command line. I creat a MS-DOS Batch file and I type the run command: java -cp myJar.jar myMain...

I wonder if there is a way to simply double click on an icon and run the application avoiding the batch file.

Anyone?

Thanx

Ppr
 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

so far, all my applications are running through the command line. I creat a MS-DOS Batch file and I type the run command: java -cp myJar.jar myMain...

I wonder if there is a way to simply double click on an icon and run the application avoiding the batch file.



You can define Main-Class: myMain in jar file's manifest file and then change the propereties of jar file to open it with java. Specify the location of java in path & anyother classes or jar files used by jar fiel to be executed- in classpath variables(environment variable in Control Panel of Window).
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks looks like a good solution. I'll do that.
reply
    Bookmark Topic Watch Topic
  • New Topic