Old error "Java error not found"

I know that this question has been asked many, many times, but I did my research and my simple test program still does not start with a double click.

When I run the program from jar (java -jar Test.jar), it will work fine, just double click the crash.

I made a simple class in Eclipse on 64-bit Windows 7 Pro, JRE 7 is used and made a Jar file (tried Runnable)

public class Test {
    public static void main(String[] args){
        System.out.println("nope");
    }
}

Basic setting image http://i48.tinypic.com/1zh36t2.png

Here is what I tried (what I remember):

Checked Manifest and make sure that the class is specified correctly and two extra spaces are added to the end of the main line of the class

The class is included in the jar

Tried Runnable Jar as well as regular Jar

In a regular box, I turned on the main class option and selected the class

ftype java cmd, ,

, .

+3
3

, : , Windows .jar java.exe.

. : JAR Windows

+1

. , , java -jar EscapedPathToJarOrQuotedPathToJar

+1

According to my reading of the JAR file specification , there should be exactly one place after the colon and zero spaces after the class name. Any additional leading or trailing spaces may be included in the name of the conditional class, and this may result in the team being javaunable to find the class name of the real entry point.

0
source

All Articles