0

I am an amateur Java programmer, and I have just started learning how Java applets work. However, I wanted to make an applet for my Chrome browser, but it no longer works because Chrome doesn't support NPAPI plugins (like Java and Unity 3D). I want to make a standalone Java executable similar to Minecraft. The idea is that once I double-click on the .jar file, it opens the application and runs the program.

The program displays text and images based on input from a text box.

How do I make the .jar automatically open on a double click?

Pranav A.
  • 460
  • 1
  • 5
  • 18

2 Answers2

2

To make a JAR which can be launched by double clicking, you have to make it an executable JAR. There must be a file META-INF/MANIFEST.MF inside the JAR with key-value pairs that point to the main class (the class with the main method) to run.

See Lesson: Packaging Programs in JAR Files in Oracle's Java Tutorials to learn exactly how to create an executable JAR.

Jesper
  • 202,709
  • 46
  • 318
  • 350
0

No. After the release of Chrome version 45, you’ll need to use an alternate web browser to load content that requires a NPAPI plugin.

But you can create application using Java Network Programming will help to create the application.