This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

why the jar file is not opening in windows 10?

 
Ranch Hand
Posts: 75
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a jar file and when I double click on it , it responds nothing. My OS is windows 10 and I have followed the steps in the picture. Does windows 10 has any exception or I'm doing the wrong way?
1.JPG
[Thumbnail for 1.JPG]
 
Saloon Keeper
Posts: 13394
296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you expect it to do?
 
Rajeev Srikhar
Ranch Hand
Posts: 75
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm expecting out like the one in the pic. I have checked with regedit procedure and also I have used the tool jarfix, but I didn't get the output i.e jar is not opening.
2.JPG
[Thumbnail for 2.JPG]
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a command line app?
If so (and someone might correct me if I'm wrong) I'm fairly sure the default app for launching java on windows (javaw) does not produce a command line.
 
Rajeev Srikhar
Ranch Hand
Posts: 75
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a small project having interaction between database and java program. I'm able to run through command prompt. I want the same work done when double clicked on the jar file.
 
Stephan van Hulst
Saloon Keeper
Posts: 13394
296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Like Dave said, javaw.exe doesn't spawn a command line prompt. java.exe does, but the command window will disappear as soon as the program has finished running, so you should usually put a readLine() statement at the end of your program so the user has the chance to see the output.
 
Marshal
Posts: 74371
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And why have you got output suggesting an Exception?
 
Rajeev Srikhar
Ranch Hand
Posts: 75
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I just want to show an output. Actually to show correct output I need to set different values for 5 claasses in Test class.
 
Rajeev Srikhar
Ranch Hand
Posts: 75
Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have kept readLine() statement at the end of my program and also associated my jar file with java.exe but still when I double click the jar file It's just opening and closing in less than a second. When I type java -jar First.jar in command prompt its working fine (console is waitng for user to enter something).
 
reply
    Bookmark Topic Watch Topic
  • New Topic