• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAR file problem.

 
Ranch Hand
Posts: 180
Netbeans IDE Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you downloaded and installed a JRE? Download page here.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Netbeans IDE Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic