0

I have Windows 7 32-bit computer with Java 1.8.0_161 and I have a problem with running jar file by double-click.

If I run jar by java -jar filename or javaw -jar filename command, everything is perfect. But if I run file by double-click I have error:

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object

So I checked regedit and figured out that java.exe from JDK is running file well, but JRE is running JAR with error above.

And it started doing it suddenly on one-year-old installation.

Thanks.

  • Your Java installation was not terminated properly. Uninstall and reinstall both 32- and 64-bit Java versions. – harrymc Apr 20 at 20:00
  • @harrymc What!? You cannot run 64 bit Java on 32 bit bit Windows. – DavidPostill Apr 21 at 11:59
  • @DavidPostill: Oups, missed that part. But a message for anyone who has a 64-bit computer: Some tools are only installed by the 32-bit version, so it's better to install both Java versions. – harrymc Apr 21 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.