Javafx application built in JDK 7 doesn't run with Java 8 - javafx

I've developed a JavaFx application using JDK 7, but now that Java 8 was released, my client unistalled jre 7 and installed jre 8, and now the app is not running anymore:
I'm not sure but jre8 should not be compatible with previous versions of java? At least the last one ?
What can I do to solve this?
EDITED: I'm using exe4j to distribute my app as .exe

Here's a link http://progressinjava.blogspot.com/2014/12/using-applications-own-jre-and-not.html
It uses launch4j to create .exe file and show you how to distribute your application with jre.

Muskan answers was very helpful because gave me a hint to bundle a jre with my application.
Actually I've not used launch4j instead I've used exe4j, which is very similar but I've used before.
If you decide to use this approach you can find step by step here.

Related

BROWSER option is missing in view listener in a tree in JMeter

I have JDK 14 and JMeter 5.3 configured on my Windows 64 bit system But I don't see "Browser" option in "View Listeners in a Tree" in JMeter.
Any ways I can get it?
The easiest solution is just to downgrade to Oracle JDK 8 as it includes JavaFX package which is required for this Browser option to work.
However according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure you should always be using the latest version of JRE/JMeter so if you need to be able to render the response in the View Results Tree listener go for the following steps:
Download and install OpenJFX
Set PATH_TO_FX environment variable pointing to the OpenJFX installation folder
Restart JMeter - at this point you should see the Browser option
Browser option was removed due to missing JavaFX suppport
Bug 63355 - View Results Tree: Browser view option is not Available with Java 11
You can downgrade to Java 8 (which include library) or add Java FX library manually
Felix Schumacher:
You either have to downgrade to a Oracle Java -- which includes JavaFX, or you try to integrate JavaFX into a newer Java version. openjfx.io claims to have JavaFX versions for newer Java versions.

How to add javafx environment variable in Ubuntu now that the Oracle removed javafx from JDK?

I recently started learning javafx but now I came to know it was removed from the core JDK since java 11. I can't seem to find a way to compile javafx application. The import declaration is not working (I am using MVC design pattern). Is there a way to get around this?
I am using VS Code
Starting with Java 9, JavaFX was moved out of the JDK so that updates to JavaFX did not have to wait on the next JDK release (at least that's what I remember). When Ubuntu switched to JDK 11 from JDK 8, they added a new package "openjfx" that provides the JavaFX libraries.
So you have a couple of options to use JavaFX.
Install OpenJFX
sudo apt install openjfx libopenjfx-java
Setup Gradle Build
If you are using gradle to build, you can set it up to download whatever JavaFX version you want. Follow the instructions from openjfx for setting up a basic gradle configuration. The linked page has an example file you can start with.
You may also want to consider using Intellij Idea Community edition IDE instead of VS Code. I think VS Code is excellent and have used it for a couple of years now including for JavaFX development. I recently switched to Intellij and the features it provides for java development are step above VS Code. Plus it's provided as a snap so easy to install:
snap install intellij-idea-community --classic
So, about the environment variable. I'm guessing you are on Linux, so you have two ways of setting it:
A) set it for current session;
B) set it globally.
Option A: open the Terminal and execute export PATH_TO_FX=[absolute path to Javafx folder]/lib. This will create a variable for your current user for the current session only - you will have to execute it every time you boot your OS.
Option B: locate the file /etc/profile; then back it up; then open it for editing and add the export PATH_TO_FX="[absolute path to Javafx folder]/lib" line to the end of it. Save the file and restart your system. This way the variable will be preserved for all users permanently.
Finally, test the Javafx presence by launching your application jar - java -jar --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml your.jar (or launch your main class as shown in the documentation).

JAVAFX not being picked up in runtime from Spring STS with Java 8 on Mac

I've installed Java 8 and Spring STS on Mac. Running jjs from the command line works. However, when trying to create a new class in a Maven project in STS, the editor doesn't recognise the javafx.* package automatically.
Attached you'll find an example of an image showing that the only Label object suggested is the java.awt one.
Any idea on how I could solve this?
Regards,
M.
I think this is related to the settings of your project. If your project is created with an execution environment JavaSE-1.8, this execution environment doesn't have the javafx API defined as accessible and you would need to manually allow that. If you choose the 1.8 JRE (as a JRE, not an execution environment) in your project settings, the JavaFX API is accessible and works nicely in content-assist, quick fix, etc. This is at least the case if you create a standard Java project.

Google NaCl with Qt on Windows

I have a project which is using Qt 4.7.4 version (also I can't rebuild it using qt4.8 or qt5 – there are a lot of errors appears, project is big and not mine so fixing issues would be even harder than erasing the whole code and write new code). So I need to make this project, well, working on NativeClient.
Is it even possible? I use Windows and Visual Studio, I was trying to google instructions about qt+nacl on Windows but just can’t find nothing.
Also which pepper version should I use if it depends on it?
Is your qt build supporting native client?
Please check out this
Windows
The Qt-Nacl is not support, for now, in Windows.
By the way, here is the github repository dedicated for it -> https://github.com/msorvig/qt5-qtbase-nacl
In the file nacl-readme it is written :
[...] Windows is not supported as a host platform.
Linux
If you want to compile in Linux, I have made a script that will compile Qt5.4 with NaCl with all the dependencies needed.
https://gist.github.com/theshadowx/438297ac465874a5e226
I also made a video that will show the different steps and a showCase at the end :
https://www.youtube.com/watch?v=q2pMv1Svtqw

JavaFX JDK not found

I'm trying to install JavaFX for the first time and it says that version 1.6.0 or higher is required but none found. Also when I load a JavaFX app in firefox or chrome it says it can't find Java. This is strange since I have 1.6.0_07-b06 installed and I actively use it for development.
Is there a certain place JavaFX looks? Is this a bug?
thanks,
Jeff
I believe Sun recommends Java versions later than Java 6 update 10 for JavaFX as it takes advantage of the new applet re-working and various other bits. Try upgrading.
Let me know if that doesn't fix your problem.
are u on windows? if so make sure the environment variable > PATH includes the path to the latest java instead of some old one

Resources