This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAR file problem.

 
Ashok Pradhan
Ranch Hand
Posts: 180
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have Win XP SP2 with JDK 1.6 installed with proper path setting.My problem I have created an executable JAR file and it working fine in another PC with same coniguration(XP2 and JDK1.6),but in my when I double click the JAR file,it displays that:-

Wndows cannot open this file:
Use the web service to find the approprate program

Select aprogram from list

But non of the program from the list would open it correctly.But I saw in the program list of that other PC has a program called:-Java(TM) Platform SE binary ,but this program is not in the program list in my PC.

Please,give me any idea to run JAR file in my PC.

Thanks!!
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The program is actually a JRE running which opens the executable .jar file,

the only solution I see is try to reinstall JDK1.6, it helps !
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you downloaded and installed a JRE? Download page here.
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file association that will make sure javaw.exe is called when a JAR file is executed is missing or broken. You can fix it yourself, but (re)installing the JRE / JDK as Sagar and Campbell suggested should solve the problem.

Actually, my guess is that Campbell is right and you don't even have the JRE installed on your PC. That would of course also explain why the file association is missing.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if you have got the JRE installed, but the program still doesn't appear in the list, then there is a Browse button just below the list that allows you to select other programs.
 
Ashok Pradhan
Ranch Hand
Posts: 180
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that if I reinstall JDK it may work.I think reinstalling the JDK is not the only solution.first I want to know which program(the file from bin derectory eg.java,javac,javaw,jar...) is responsible to executing JAR files.,but I have tried opening the JAR file with java,javaw,jar, but it does not working.If any any other option is left then suggest me,because if I give my JAR files to my friends and JRE is installed in their PC but they couldn't run my apps then it is not fair to tell them to install JRE
again and again tiil it work.

In my PC if I execute The JAR file in command prompt it works:-

D:\>java -jar DigWatch.jar

Thanks Sagar,Campbell,Rob and Joanne !!!
[ July 25, 2008: Message edited by: Ashok Pradhan ]
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have already said you couldn't find a java.exe on the 2nd PC, so you will have to install at least the JRE on that machine. Any computer would require a JRE to execute any Java files.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic