Java -Xbootclass Path Is No Longer a Supported Option

Problems with setting up PATH in Java

As you can see in your environment settings you have JAVA_HOME:

C:\Program Files\Java\jdk-10.0.1\bin

And in path variable you do this:

%JAVA_HOME%\bin

So your path looks like:

C:\Program Files\Java\jdk-10.0.1\bin\bin

Which doesn't exist.

Second thing is that JAVA_HOME should point to jdk catalog not bin

Solution:

Change your JAVA_HOME to this:

C:\Program Files\Java\jdk-10.0.1

How do I fix maven error The JAVA_HOME environment variable is not defined correctly?

The SETX command does not modify the current environment.

If you run the following batch file:

setx AAA aaa
echo AAA=%AAA%

It will print

AAA=

So your batch file is wrong. You have to use set:

set AAA=aaa

See What is the difference between SETX and SET in environment variables in Windows.

Javac is not recognized even after setting the path

This problem happens when you define your JAVA_HOME under User variables and not under the system variables.

Try moving the JAVA_HOME to System Variables and restart the command prompt. It will work like a charm.

Sample Image

Java Problem in setting path (can't compile java in CMD)

You need to fill javac with options. Meaning that you can't just call javac without a file to compile. when you write javac in terminal without any arguments, by default it will run javac -help and display the options you see.

To really see if it works:
Create a new java file.
To compile (in the same directory): javac <java_file_name>.java
To run: java <java_file_name>

Error Source option 5 is no longer supported. Use 6 or later on Maven compile

This helped me:

  1. Right Click on Project.
  2. Click on Build path.
  3. Click on Configure Build path.
  4. It opens a Java Build path window.
  5. Click on Java Compiler in the Left side.
  6. It navigates to Java Compiler window in that to set the Compiler compliance level is set as according to your jre version(ex if java version is 1.8
    then choose 1.8) as select.
  7. Click on [Apply] button.
  8. Click on [OK] button.
  9. Right click on Project > Maven > Update the project.
  10. Right click on Project > Run As > Maven install -- The pom.xml file is running and java jars are download and installed to project.
  11. Right click on Project > Run As > Maven Test -- The pom.xml file is running and java jars are download and installed to project.

Then you got the Build Success message and your maven project is created successfully.



Related Topics



Leave a reply



Submit