0

The exact error I'm getting is

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

I get this error when I type in java -version or do anything relating to java. I've tried reinstalling with no luck, may JAVA_HOME is set to

C:\Program Files\Java\jre1.8.0_231

And my path variable is set to

C:\Program Files (x86)\Common Files\Oracle\Java\javapath
and also
C:\Program Files\Java\jdk1.8.0_231\bin

Any help is appreciated, thanks!

AcidVIper
  • 13
  • 4
  • have a look on this answer https://stackoverflow.com/questions/11808829/jre-1-7-java-version-returns-java-lang-noclassdeffounderror-java-lang-obje. And remove this C:\ProgramData\Oracle\Java\javapath if it is set. – Dhrumil Patel Nov 21 '19 at 20:19
  • This didn't resolve my issue, that's why I've created this – AcidVIper Nov 21 '19 at 21:16

2 Answers2

0

open command promt step 1: type java .It will display a big list.If it does not show any thing then uninstall your java and reinstiall lower version. step 2: type javac .It should display a big list then you jdk is working properly . If it shows command not found output then your have not assigned enviroment variables correcly. Follow this link to set path:enter link description here

  • Hey! I've tried reinstalling a previous version and it yielded the same result. When I type in javac a long list pops up so I assume it's working. Unfortunately this didn't fix it but thank you for the help! – AcidVIper Nov 21 '19 at 20:11
  • Did you tried typing java also,if it the list doest popups then set envirolment variable. – sandeep kella Nov 21 '19 at 21:52
0

Reinstalled both my jdk, jre, and java in general.

AcidVIper
  • 13
  • 4