1

i've got an error in java because i had to reinstall windows.

Error occured during initialization of VM

I tried in CMD to use java and the exact same error occurs! I reinstalled java jre and removed jdk, still nothing helped. Any idea on how to solve this?
To make sure that it was not working i searched for Bukkit and tried to run the server, the exact same thing happens. When i tried java -version enter image description here

Alex Pyrg
  • 75
  • 7
  • type `java -version` in the command line to check if you have it installed. – DimaSan Aug 27 '16 at 10:06
  • @DimaSan The same thing happens!I'll edit the post to upload a pic of it! – Alex Pyrg Aug 27 '16 at 10:09
  • 1
    Possible duplicate of [JRE 1.7 returns: java/lang/NoClassDefFoundError: java/lang/Object](http://stackoverflow.com/questions/11808829/jre-1-7-returns-java-lang-noclassdeffounderror-java-lang-object) – xenteros Aug 27 '16 at 10:26

1 Answers1

1

According to the comments, the problem was with the PATH.

Go to your environmental variables and check if there is a variable pointing to java.exe in jre directory. Reinstalling jre should solve the problem but to avoid it you can try the following:

The variable pointing to C:\Program Files (x86)\Java\jdk<version> should be called JAVA_HOME and the path variable should be extended with %JAVA_HOME%\bin\ and %JAVA_HOME% itself. Then somehow it might have the advantage to javapath

xenteros
  • 15,586
  • 12
  • 56
  • 91