Extra dll files packaged by JavaFX installer between jdk 8u144 and 8u172 - java

I am building an installer for a JavaFX 1.8 Windows application.
This application contains a JNI.
When I run the Ant script with the jdk 1.8.0_172, files named api-ms-win-core-*.dll and ucrtbase.dll are copied to the runtime\bin install directory. Those files are not present when I run the exact same script with jdk 1.8.0_144.
I have tested my program without those files and it works fine. What could be a path to investigate to understand how to get rid of those files?
Also, msvcp120.dll is updated to msvcp140.dll and vcruntime140.dll file appears (and is needed).
Thanks!

Related

Launch4j not opening even when I have JRE installed

I installed the last JDK from this website (Java SE 14.0.2). This installed both jdk14.0.2 and jre1.8.0_231 in the java folder of my Program Files folder.
I want to make a .exe file out of my jar files using Launch4j however, I can't run Launch4j because everytime I try, it says it requires a java runtime environment. I'm confused because I should already have one installed (jre1.8.0_231), so why isn't it recognizing that?

JavaFX runtime components are missing whenrunning an exported jar

I created a project in eclipse and want to run my exported .jar file on an other machine. When I try to do so using "java -jar myfile.jar", I get the following message:
Error: JavaFX runtime components are missing, and are required to run this application
If I run it in eclipse (using jdk13), everything works.
On the machine where I want to run the jar file I installed openjdk and openjfx. Actually I'm not sure wether the problem has to be solved in eclipse while exporting the jar file or on the other machine while running it? And how? May anyone give me a hint?

Where is the Java "jar" function

I'm looking to make a jar file out some Java code using jar [options] [name] [files] from the command line but it's not recognized.
According to Oracle Jar is part of the JDK. I have both 7 and 8 installed. How do I run the jar function?
I don't have a C:/Java that the Oracle documents show. I've tried running jar from within the JDK directories and with admin rights.
I'm not putting params in yet, want to check I can at least find the jar function first.
Running jar from JDK directory(1.8) http://puu.sh/eoer7/4fcd0ce63c.png
Running jar from System32 http://puu.sh/eoe3X/076d79b4e4.png
You have displayed two installations of the Java Runtime Environment (or JRE). You need to install a Java Developer Kit (or JDK), to get jar. Set your JAVA_HOME to the installation directory of the JDK, and add it to your PATH.
set "PATH=%PATH%;%JAVA_HOME%\bin"
Also, Using JAR Files: The Basics says (in part) JAR files are packaged with the ZIP file format, and you can use tools that can read and write ZIP files to work with them.

How to run built java file with the extension .jar

I made a desktop application with Java netbeans, it's a Jframe with some components. I built it and the .jar file created in the dist folder in the project folder. I have already the jre (Java Runtime Environment) installed on my pc. When I try to open the .jar with the jre I got nothing, Nothing appears. What can I do ?
https://netbeans.org/kb/articles/javase-deploy.html#Exercise_1
The link above will take you to a tutorial. Jar files are not executable by default. You need to specify a starting class to make a jar file executable.
If this doesn't work, then make sure you have called setVisible(true) on your JFrame.
Edited to add: (author added info)
When I try to run through CMD there's Unsupported major.minor version 52.0
This means your JRE version does not match your compiler version. You can confirm with the -version option, then fix your path to use Java from the same place your compiler lives.

Error: JavaFX runtime components are missing, and are required to run this application

I tried to build the application using javafx ant build, generated jar file.
But when I run the jar file, issue:
Error: JavaFX runtime components are missing, and are required to run this application.
The javafx-class-path: libs/h2.jar libs/jfxrt.jar libs/log4j.jar
Running the JAR file using:
java -jar app.jar
What could it be?
I was able to reproduce your issue on windows machine (with java8 64bit version).
One simple work around could be: try reinstalling java again.
Another could be: copying jre/lib/jfxrt.jar to jre/lib/ext/jfxrt.jar

Categories

Resources