I created jar file and it can be run well through comand prompt..
(using java -jar <file name>)

How can I make it run by clicking the the .jar file ?????

Recommended Answers

All 2 Replies

As long as you installed Java correctly, then "double-clicking" (or however the target system handles launching programs from the "desktop") will work. Otherwise, it depends on the system. But, as long as you have a correctly configured manifest file in the jar, and you have installed java correctly, there is nothing more to do.

There been some issues with classpath associated with file extension under Windows when you had to swap it from JRE to JDK or vice-versa to get it working with double-click, sorry cannot remember exactly

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.