But of course that's only viable for Maven projects. I realize that you don't want to do that, but unfortunately there's no silver bullet in the current release of NetBeans (8.2).Īn alternative approach would be to build and run using only JDK 8, but include the Animal Sniffer Maven plugin "for checking projects against the signatures of an API", to verify that your 1.6 code was not using illegal APIs. Switch the Java Platform to 1.8 on the Libraries screen to run your 1.6 code under 1.8.Yet setting Preferences->LXQt Settings->Font->Point size in the Ubuntu control menu, which is normally respected by most Unix app windows, does not carry through either. The menu fonts are way too small on a large screen. Set the Java Platform to JDK 1.6 on the Libraries screen, and set the Source/Binary Format to JDK 6 on the Sources screen, then build to verify that no invalid APIs are being used. Netbeans 12.1 no longer respects the -fontsize directive in the /etc/nf config file.NetBeans features such as code coloring, code formatting, and auto-completion now support new Java. Configure your Glassfish 5 server to use JDK 8 instead and everything will be fine. Create platforms for JDK 6 and JDK 8 in NetBeans. Apache NetBeans release 12.2 offers, among others, (improved) support for Java 14 and 15.Switch the Java Platform to 1.8 on the Libraries screen to run your 1.6 code under 1.8. Set the Java Platform to JDK 1.6 on the Libraries screen, and set the Source/Binary Format to JDK 6 on the Sources screen, then build to verify that no invalid APIs are being used. Unfortunately that can't be done, as shown by the open bug. Create platforms for JDK 6 and JDK 8 in NetBeans. What I want is: Project-Platform = Java 6 (used to compile), My own view is that the field should be removed until it serves a useful purpose. How to set the project sources JDK version in Netbeans Ask Question Asked 3 years ago Modified 3 years ago Viewed 2k times 1 From the console javac builds with JDK 14 fine. It's also worth noting that the Help documentation for the Run screen does not mention that Runtime Platform field. There is an open Bug Report for this: Bug 186747 - Can't Build and Run with Different Java Versions. I suspect that it may have been (unwisely) added to the GUI so that at some time in the future it will be possible to actually select a different JDK to run against. Of course that invites the question "What is the point of even having that Runtime Platform field?". As you point out, its value can only be Project Platform. How can I change the Projects Runtime Platform?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |