Reputation: 900
How can I specify two names to satisfy a Java dependency? I'm using Netbeans and by default, Linux calls OpenJDK "JDK_7". Windows calls Oracle JDK "JDK 1.7". I would like to make it so that by default either name is acceptable because my code builds the same on both platforms.
Is there a way to specify a "platform" can be either A or B in Netbeans/ant?
Upvotes: 3
Views: 22630
Reputation: 1
In my case, my IDE (Apache NetBeans) did not have the correct version of Java selected (JDK 1.8). The way I solved it was the following:
If you do not have JDK 1.8 (jdk-8u202) released:
Upvotes: 0
Reputation: 900
There are two lines in the nbproject/project.properties file
platform.active=default_platform
platforms.default_platform.home=${java.home}/../
These make the Netbeans Platform choose the default platform as the standard platform.
Upvotes: 5
Reputation: 2360
Right click on the project. Then, select "properties". Select "Libraries" from the categories on the left hand side of Project Properties. And then select the new "Java Platform".
Upvotes: 11