my dog learned polymorphism*
The moose likes Beginning Java and the fly likes jar on double clicking? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jar on double clicking?" Watch "jar on double clicking?" New topic
Author

jar on double clicking?

bala chidambaram
Greenhorn

Joined: Jan 19, 2004
Posts: 24
hello friend
I able to create a jar file in java as guidance provided by 'dirk'(thank u dirk). i can execute it in command line but find nothing on 'double click'(no error message). suggestions are welcome.
thank u
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
does your app run from command line or else has graphical interface?
because if the first is true then you'll see nothing, as a matter of a fact


java amateur
bala chidambaram
Greenhorn

Joined: Jan 19, 2004
Posts: 24
thank u miguel for ur response.
I tried with two programs, one is about invoking a 'frame' and other is simple one carries 'System.out.println("...");'. both are working with
the command as follows.

>java -jar mainclass.txt jarfile.jar
suggestions are welcome.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Assumed you're running a kinda windows.
There is a MenuOption in Explorer 'Datatypes'.
Here you have to tell Windows, what you want to do, by hitting enter on a 'jar'-File.
Describe '.jar'-extension as Java-Archive, and define the program to execute, someting similar to 'java -jar %*%'.
Have a look at other entrys like 'html' 'doc' etc., to find out about the details.


http://home.arcor.de/hirnstrom/bewerbung
bala chidambaram
Greenhorn

Joined: Jan 19, 2004
Posts: 24
sorry...
I cannot understand what do u say,Stefan.plz help me to understand.
thank u.
himanshu patel
Ranch Hand

Joined: Feb 03, 2003
Posts: 205
see this link ,
http://www.cis.upenn.edu/~matuszek/cit597-2002/Pages/executable-jar-files.html
Follow paragraph titled , "To make jar files executable (Windows 98): ".


If you want to become a rich, do not work for others but make others to work for you.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
bala,
Your likely problem is that your operating system isn't properly configured to run a JAR file when double-clicking on it.
If it helps, my settings for this file type are as follows.
"D:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe" -jar "%1" %*
If you need help on configuring your system to handle files with the .jar extension differently, just ask.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jar on double clicking?