I installed JavaFX for eclipse as a plug-in and after downloading it I received this error message:
You are not running your eclipse instance with Java8.
The JavaFX tooling is disabled because of this.
Make Java8 the default system java or
adjust your eclipse.ini to pass -vm pointing to your Java8 install.
In case you want to turn off this check open your preferences and go to General > Startup and Shutdown and uncheck 'JavaFX Tooling Java Check'
I am using the jdk-16.
Any idea why it is not working for me?
Update each piece of your tool chain.
The style of the reported Java version number changed since Java 8. This breaks some tools that expect only the older version number format.
See JEP 223: New Version-String Scheme.
Related
If I create a project in Eclipse from scratch, and I assign Java-9 as JRE :
And after that I go to project properties, I see the following message The system libraries from the selected release 9 will be used with '--release' compiler option using current JRE 10:
If I change an existing project of Java 8 to use Java 9, as the image shows:
And after that go to Properties - > Java Compiler, I see a different message, When selecting 9 compliance make sure to have a compatible jre installed and activated:
I don't understand why is there a different message in both scenarios, I believe that I'm doing the same, so I think that should I get the same message.
I want to switch the jdk of my existing project, so my question is: Is there any problem if I keep using the last project with that Warning? Or should I create a project from scratch in order to be sure that will work properly?
EDIT: List of Installed JREs:
Execution environment list:
I am working on a project which runs on java 8, but I frequently use jasper reports which runs on java 7 for generating PDF reports. Problem is that I have to switch between the 7 & 8 versions for this. Is there any way I can let the system know which version of Java to use for which applications. My tomcat server is wrapped within a Hybris server instance which is run externally, so changing compliance level in Eclipse is of no help.
As per described here you can install any number of JDKs. The system default will be the one you added to the PATH variable under environment variables. When you create a new project in NetBeans select the desired JDK location. (Java 7 or Java8). You can refer this.
Maybe my question was misunderstood, but I found a way to acheive what I intended to do.
Set your JAVA_HOME to 1.7 version and open iReports application(it did not open if version is set to 1.8). Then reset JAVA_HOME back to 1.8 and run your application normally. Once iReports has started, there is no further issue while developing your reports.
It is more of a hack than a proper solution, but works well enough for me.
How can I change the Projects Runtime Platform?
(standard NetBeans [8.1] Java Project [Java Application])
Details:
using Ubuntu with NetBeans 8.1
I have installed JDK 1.6, JDK 1.7 + JDK 1.8
My projects platform is Java 6.
My systems default Java is Java 7.
NetBeans-IDE was started with Java 8.
When I run the project via the IDE (Run project), the Project-Platform is used (which is Java 6).
I cannot change the Runtime Platform!
It's always: Project Platform
I tried to Manage Platforms..., but I still can't change the value of the Runtime Platform-ComboBox.
EDIT:
As I wrote in the comments, I don't want to change the Project-Platform.
The project should be compiled with Java 6 but run with Java 8 (when click on Run project).
What I want is:
Project-Platform = Java 6 (used to compile),
Runtime-Platform = Java 8 (used to run).
How can I change the Projects Runtime Platform?
Unfortunately you can't. As you point out, its value can only be Project Platform. Of course that invites the question "What is the point of even having that Runtime Platform field?".
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. There is an open Bug Report for this: Bug 186747 - Can't Build and Run with Different Java Versions.
It's also worth noting that the Help documentation for the Run screen does not mention that Runtime Platform field. My own view is that the field should be removed until it serves a useful purpose.
What I want is: Project-Platform = Java 6 (used to compile),
Runtime-Platform = Java 8 (used to run).
Unfortunately that can't be done, as shown by the open bug. The best you can do right now is:
Create platforms for JDK 6 and JDK 8 in NetBeans.
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.
Switch the Java Platform to 1.8 on the Libraries screen to run your 1.6 code under 1.8.
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).
An 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. But of course that's only viable for Maven projects.
Please look at Netbeans Project Setup - Setting the Target JDK in a Project
You just have to change the Runtime Platform at the Libraries option, that's all.
Just went through this pain for Apache NetBeans 14. I was trying to set a remote debug for a Raspberry Pi.
It works only if the jdk match on both the local and remote versions. In my case I set them both to 17.
I would have expected that the default jdk on the local machine should have been able to be changed but I fail to determine how.
I am running Ubuntu on the local machine so maybe the platform cannot be changed (don't know). Moving on.
Changed runtime platform
I tried to install e(fx)eclipse tools in Eclipse Mars but it not successful and show that message when I start Eclipse:
You are not running your eclipse instance with Java8. The JavaFX tooling is disabled because of this.Make Java8 the default system java or adjust your eclipse.ini to pass -vm pointing to your Java8 install.
In case you want to turn off this check open your preferences and go to General > Startup and Shutdown and uncheck 'JavaFX Tooling Java Check"
Could anyone help me about this?
As stated an update might be everything you need. I had a similar issue under Linux once, where there were two JVMs installed and the older one was in the projects build path.
You can check under the projects properties -> java build path if Java 1.8 is shown there.
Regarding tools: I don't think you'll need any. Try and get familiar with the JavaFX Scene Builder. It makes building a simple GUI super easy.
As we know, we are in transition between Java 7 and Java 8. I have both Java 7 and Java 8 JDK installed. However in the interests of keeping a hands-off approach I want to make java 7 JDK my default Java build environment.
Leaving Java 8 JDK installed for trials, testing, and migration.
However at the current time, Netbeans 8 insists that Java 8 is-the default.
What I'd like to set: Java 7 is default.
And only specify Java 8 on a per-project basis until I'm satisfied with the new build. At that point, I imagine we would change our default Java. The challenge is that there's no clear way to change a default Java configuration.
This is not helped by the fact that the "Java Platform Manager"is not part of "Options", and lives on the Tools menu / "Java Platforms. I have been able to to this successfully with IDEAJ when moving from Java 6 to Java 7. Everyone is using Netbeans on this project so we need to achieve the same end with Netbeans. To be clear, I'm comfortable using Java 8 for the Netbeans runtime. It is just project builds that I want as a specific Java 7 target environment.
According to the topic below: In NetBeans how do I change the Default JDK?, changing NETBEANS_JDKHOME will also change my netbeans running environment. So I would prefer to just set the build-target generally. Thanks in advance!
see also:
In NetBeans how do I change the Default JDK?
Netbeans v8 README: "nbjdk.active [since 5.0u1] - name of a Java platform (JDK) to use when building and running".
If I understand you question properly, each project can be assigned it's own Java Platform property, for example, right click the project in question and select "Properties"...
From the properties dialog, select "Libraries" and then select the "Java Platform" you want to use...
Personally, I find having the platforms pre-configured simpler.
If you're upgrading a project, you may also need to check the "Source/Binary Format" property in the "Sources" sections (it's own the bottom), as it will stay at the level of the old version of Java (if you downgrade, it adjusts automatically)
One solution is to change the netbeans configuration file netbeans.conf with is located in ...\NetBeans 8.0\etc.
But it does not work well...
The bypass we found is to spefify the jdk in the shortcut that launch Netbeans into
"...\NetBeans 8.0\bin\netbeans.exe" --jdkhome "C:\Program Files (x86)\Java\jdk1.7.0_60"