In Windows 7, double-click the jar file to run the java jar file. If a tool such as winrar is installed, double-click the jar file to open the file, instead of running it directly. Or double-click the "Can not find main class, Program will exit" error ". You can modify the Registry to solve this problem. Www.2cto.com
Right-click the jar file and choose open mode> default Program> View. Select javaw.exe( for example, My javaw.exe file is under C: \ Program Files \ Java \ jre6 \ bin) in the binary file under jre, and then open the registry:
HKEY_CLASSES_ROOT \ Applications \ javaw.exe \ shell \ open \ command. The default value is "C: \ Program Files \ Java \ jdk1.6.0 _ 21 \ jre \ bin \ javaw.exe" % 1 ", change the data value to "C: \ Program ".
Files \ Java \ jdk1.6.0 _ 21 \ jre \ bin \ javaw.exe "-jar" % 1 "(you only need to add-jar to the original value, jar files can be directly run. Ps:-jar has spaces on both sides of ganglong99