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

how to lauch an executable jar in windows

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how would i lauch an executable jar in windows
i think i have done everything right, but when i
click on it; ie the jar file I get prompted
by windows on what type to use to open this file.
Did i forget to do something
Ps i have written a manifest stating my main class
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to tell windows how to use this extension.
If I go to Explorer and go to
tools\folder options\file types\
I have an entry for "Executable Jar Files". If I edit that entry it says that this is "application/java" and that it opens with java. If I edit the actions it says:
C:\Program Files\JavaSoft\JRE\1.4\bin\javaw.exe -jar
I am using WinNT today.
[This message has been edited by Cindy Glass (edited October 11, 2001).]
 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to install the app on other
peoples machines. So how would they lauch the
executable jar if they didnt have the JRE would it still
work with the JVM only.
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bundle the JRE with your app, and have them start it with a .bat file. Then you can set the classpath on the way in, and it allows you to bring in a properties file as a parameter. No messing with other peoples file type attributes.
 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
shouldnt an executable jar run without
having to include a JRE. By double clicking on it
should it not run
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It will run IF you have java installed on the computer, IF the path and classpath have been properly set, and IF the OS knows how to handle the jar extension. If not, then it won't run.
Many PC's today come with pre-installed software, and java is OFTEN included in that set-up. But you are at the vendors mercy as to whether or not the .jar file type was configured, and the setting correct.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic