Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

netbeans - Java warning: [options] system modules path not set in conjunction with -source 11

This machine has had multiple version of Java JDK installed and multiple version of multiple IDEs (Netbeans, IntelliJ, Eclipse, etc.) Most recently, I have added JDK 15.0.2 and Netbeans 12.2. When trying to compile a simple "Hello World", this is the output that results:

ant -f C:\Data\NetBeans\grading\TestGrading -Dnb.internal.action.name=run.single -Djavac.includes=testgrading/HelloWorld.java -Drun.class=HelloWorld run-single

init:

Deleting: C:DataNetBeansgradingTestGradinguilduilt-jar.properties

deps-jar:

Updating property file: C:DataNetBeansgradingTestGradinguilduilt-jar.properties

Compiling 1 source file to C:DataNetBeansgradingTestGradinguildclasses

**warning: [options] system modules path not set in conjunction with -source 11**

**1 warning**

compile-single:

run-single:

Hello World!

BUILD SUCCESSFUL (total time: 1 second)

As you can see, the file compiles and runs, but the warning is causing me concern. I have not been able to find a similar warning in my searches... (all of the warnings refer to "bootstrap class path not set" instead of "system modules path not set"

I have updated my Environment Variable to reflect the most current JDK with this entry: JAVA_HOME=C:Program FilesJavajdk-15.0.2

What setting am I missing that wasn't properly updated as I've updated my JDK and my IDE? Or am I completely looking in the wrong places? Or do I need to fully uninstall previous versions and, if so, what will that do to previous code written using those previous versions that I'd still like to retain?

Thanks in advance!

question from:https://stackoverflow.com/questions/66068153/java-warning-options-system-modules-path-not-set-in-conjunction-with-source

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It is sometimes happened because of java updates. When the newer version is needed,it says you to remove the older version. If you didn't do that this cause come confusing. You can better use older versions to solve this problem. Maybe this can help you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...