Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar on double clicking?

 
bala chidambaram
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
bala chidambaram
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
bala chidambaram
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry...
I cannot understand what do u say,Stefan.plz help me to understand.
thank u.
 
himanshu patel
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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): ".
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic