I'm trying to create an MSI-installer for my JavaFX application. This is briefly what I've done so far. I created a new artifact for JavaFX and selected the Native Bundle to be MSI in the Java FX -tab. After that, I built the artifact. When I opened the output -folder, there was no .msi installer. Instead, there were 3 other files (one HTML-, jar-, and jnlp-file). What am I missing here? Where is the MSI-file?
What you are looking for is all part of standard JDK 14. Its called jpackage.
If you need a tutorial to see how it works have a look here: https://github.com/dlemmermann/JPackageScriptFX
Related
I was following this tutorial to set up JavaFX on the Apache NetBeans IDE. I created the library as instructed and created the Controller.java and FXML files (literally just copy/pasted from the examples, along with the Main.java and HelloFX.java files; I wrote nothing of the code itself).
I tried the solution on step 5 for the JavaFX runtime components are missing, and are required to run this application error, but it just makes a new error pop up: java.lang.module.FindException: Module javafx.controls not found.
The directory the components are on is D:\Programas\javafx-sdk-13.0.2\lib, which I supplied as instructed (--module-path "D:\Programas\javafx-sdk-13.0.2\lib" --add-modules javafx.controls,javafx.fxml). I also tried setting an environment variable as instructed here and using that instead (--module-path $PATH_TO_FX$ --add-modules javafx.controls,javafx.fxml), to no avail.
I searched for solutions for a long time, but the questions either lack answers, or I just find the same tutorials over and over again, often for old versions of the Java SDK and/or NetBeans IDE.
I'm new to both JavaFX (I was learning Swing when I found out it's getting the boot) and the NetBeans IDE (I'm used to Eclipse), so I'm completely in the dark here.
EDIT: Added screenshot as requested.
I found an answer on GitHub that sort of worked. Here they say you can remove the VM arguments if you add the JavaFX library to the Run option in the libraries for the project, but I was only able to get everything to work by adding the library and keeping the VM arguments.
I try to use Scuba project.I downloaded source with SVN checkout and imported it into Eclipse .Also i imported scuba_smartcards project. Everything is perfect but i have one problem.When i try to run scuba project like java application,have this error message:
Selection does not contains main type
I don't know is a correct to run this source like java application or not.By the way i created my own java class and i want to use scuba's source in main method
Ho i can solve my problem?
thanks everyone
P.s i also found source in github
https://github.com/credentials/scuba
I'm using scuba_sc_j2se
SCUBA is a framework, basically it is a library with active components. Libraries are not standalone applications so they will not contain a main method of their own. You cannot just run it, you need to write or copy an application that uses the framework through the API presented by SCUBA.
One of these applications is the jMRTD application from which SCUBA originated.
I did a sample application mentioned in this link using Netbeans Wizard template https://platform.netbeans.org/tutorials/nbm-wizard.html
But how do I export as executable jar. I just want to execute the project independently with out IDE. Any suggestions.
I can't find it in the tutorial that you point to but in order to share your newly created Netbeans plugin you need to export it as a binary NetBeans Module or .nbm file. Right click on your project and select Create NBM. Check this old tutorial here: http://docs.huihoo.com/netbeans/6.0/kb/60/platform/nbm-google.html
For Netbeans 8.0: When the file is created you can then go Tools->Plugins , downloaded tab and then click add plugins
EDIT (based on your comments)
The tuturial you point to guides you to build a custom Netbeans module (in this case a Wizard). The module is packaged as a .nbm file which you can then distribute it so that it can be installed to any Netbeans IDE.
As it turns out you need something like a "Java swing wizard" application. By searching google you can find some results that fit your needs (these are from the first google results):
http://www.oracle.com/technetwork/articles/javase/wizard-136789.html
https://code.google.com/p/cjwizard/
http://www.javaworld.com/article/2077850/java-se/open-source-java-projects-the-wizard-api.html
http://sourceforge.net/projects/jwf/
Similar question (maybe you can post a comment asking for details there):
https://softwareengineering.stackexchange.com/questions/132723/is-there-a-java-library-to-create-assisted-wizard-flow-into-your-desktop-applica
Hope I am not leading you to the wrong way but another thing you can also have a look at, (haven't checked it myself but you might find it useful) is how to create OSGI modules and the posibility of converting Netbeans modules to OSGI modules.
Look here: http://wiki.netbeans.org/OSGiAndNetBeans.
I'm trying to follow the guide to export my project as a Java applet.
My project, as seen in Eclipse, has three directories:
Game
Game-Android
Game-Desktop
They were created using the UI Setup tool. The guide at http://www.thesecretpie.com/2011/05/being-like-minecraft-or-how-to-run-your.html is confusing and I don't understand these points:
Next step: add a new file called HelloWorldApplet.java (in the same
directory as other source files).
"The same directory as other source files". Well, I have three directories and they all have a source folder. In which of these three am I supposed to put this file? I tried placing it in Game, but Eclipse is unable to resolve com.badlogic.gdx.backends.lwjgl.LwjglApplet. If I put it in Game-Desktop it seems to be OK, but I'm not sure.
Create a directory called applet in your project dir.
Again, in which of my three directories?
Just export the whole project as jar in Eclipse
I can export a JAR for Game, Game-Android, or Game-Desktop. Which of these?
Related:
I happen to be using the JRuby JAR in my game to run some ruby scripting logic. Do I have to do something specific about it?
That blog is little old. For example, the JOGL backend is gone from recent version of Libgdx (so you don't need to worry about switching to the LWJGL backend). Also, the current LWJGL bundled into Libgdx is 2.9.0 (hopefully that doesn't change too much, though).
I believe the instructions are effectively packing up the "desktop" build of your app into an Applet (as the desktop is the only build that use the LWJGL backend), so assume Game-Desktop is the "same directory" that its talking about.
Thus, you should export the .JAR from your Desktop project.
On a related note, there is another way to run your game on the web, using the GWT backend. Check out the Setup & Running page (where its called "HTML5"). There are a bunch of caveats on using the GWT backend (not all Libgdx APIs work over there). (Hmm... I doubt this will work with the JRuby JAR, so probably not worth spending too much time on that.)
I am having trouble packaging an application with both Swing and JavaFX components into a JAR file. Running it from Eclipse is fine. But when executing the Jar, errors occur: The main method is run, which calls the constructor of my app. The constructor calls a initAndShowGUI() method, which tries to create a JFXPanel for later addition to a JFrame, but fails with following error message: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\User\bin\glass.dll. This library seems to be needed by JavaFX but is somehow not loaded. "Pure" JavaFX apps (without Swing) call something like a "preinitialitation" method for JFX that loads all the needed libs, I think (I'm not completely sure). Also, I've found information on how to deploy Java Web Start apps or applets (http://docs.oracle.com/javafx/2/deployment/deploy_swing_apps.htm), but nothing on "standard" JARs.
Has anybody done this before? I've been looking for a solution a lot but have not been able to find one. Help is highly appreciated!
Likely your issue is packaging related.
How did you package the app?
For example:
Did you use e(fx)clipse?
Did you use the the javafx ant tasks?
Did you use the javafxpackager?
I know (at least) the last two will work to build a Swing application with JavaFX components into an executable jar.
The SwingInterop sample includes an ant script for packaging the sample into an executable jar. The sample is downloadable from the javafx download site.
I highly recommend reviewing Why should I use the JavaFX ant tasks for packaging my Swing application? which post also includes the source for the SwingInterop sample build file.