The warning is not necessarily the problem with making it clickable.
To make a JAR executable, you have to specify the 'main' class in the JAR's 'manifest' file, for example:
Manifest-Version: 1.0
Main-Class: MyMainClass
You then create the jarfile, specifying the manifest file above. If doing this manually, it's something like:
jar cvfm myapp.jar myManifest *.class
If you created the JAR from NetBeans instead, I expect there's a setting for this:
Updated see Producing executable jar in NetBeans for information on this.
If you don't specify the main class, then the JAR can be used as a library, but it can't be executed directly as a program without using a commandline script to specify which class to run, e.g.
java -cp myjar.jar com.myco.myproj.MyMainClass
which runs Java, putting your jarfile on the classpath (i.e. making all your classes available) and specifies that MyClass
is the main class, i.e. the starting point for your application. MyClass
must have a main
method defined, or this won't work.