This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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?
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.
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.
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.
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.
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).
What? Why? Where? When? Which?
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Gift giving made easy with the permaculture playing cards