JavaFX desktop deployment as EXE file - deployment

I am using eclipse IDE and have been trying to deploy the application with Ant from inside Eclipse as an .EXE file. Inno Setup 5.0 is installed and in my environment path.
C:\Program Files\Inno Setup 5;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_45\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\DW WLAN Card
This is the Error I have from the build
Project\build\build\classes\META-INF
Using base JDK at: C:\Program Files\Java\jdk1.8.0_40\jre
Bundler EXE Installer skipped because of a configuration problem: Main application jar is missing.
Advice to fix: Make sure to use fx:jar task to create main application jar.
BUILD SUCCESSFUL
My question is how do I include the jar and do I have the path coorect for Inno Setup 5.0

#Phantomazi
nice edit
#James Duh
Here are the step by step instructions to build an EXE file with Eclipse Luna for a JavaFX Project
Right Click Project Name in Eclipse
Select Build Path
Configure Build Path
Click Libraries Tab
Click Add JAR
Select your project then navigate to build -> dist -> libs
You should have a ProjectName.jar file in the libs folder
If not create a jar file by opening build.fxfuild
Set Package Format to NONE
Click Generate ant build.xml and run
then set Package Format back to EXE
You Console View will tell you where the EXE file was saved
Example
C:\Users\User Name\workspace\Project Name\build\deploy\bundles

Related

Creating jar executable w/ external jar (JXL) in ECLIPSE java

I can't find a working solution for my jar executable. The program runs perfect in my Eclipse IDE, but when I attempt to follow Eclipse instructions, the executable does not work with external JAR.
The JXL jar is in my build path. Anyone know how to get this working through Eclipse? I do not have access to command line.
1.) Right-click on project, select pop-up menu entry "Export...".
2.) Select "Java -> Runnable JAR file".
3.) Choose a working launch configuration for running your program via java -jar MyExecutable.jar from the command line later. Select an output folder and file name. Select "Package required libraries into generated JAR".

How to import JavaFX 2 project created from netbeans 7.2 in Eclipse?

I want to use Eclipse to develop JavaFX. I am trying to import a JavaFX 2 application created in Netbeans 7.2 into Eclipse. But Javafx 2 uses its own Ant build syntax. So when I try to import this Ant project into Eclipse I get the following error:
Specified build file does not contain a javac task
How do I solve this error? I know there are JavaFX plugins for Eclipse, but I haven't been able to find any that solves my problem. Or do I need to try something else?
Open http://efxclipse.org/install.html, scroll down to "In Eclipse 4.2 for the adventurous".
After you have configured properly by setting the path for JavaFX SDK from Window->Preferences, create a new JavaFX project (File->New->Other->JavaFX->JavaFX Project)
Right click on your projet->Import->File System->Select the top level of your NetBeans created project folder-> Select src folder,build.xml, manifest.mf and any other FXML files you wish to import.
For a distributable standalone executable JAR, refer to http://www.efxclipse.org/tut2.html. If you face any problem in Step 11- Click on the "ant build.xml and run" Link in the Build section of the editor, then goto Window->Preferences->Ant->Runtime->Global Entries->Add External JAR->(Browse to your JDK lib folder) Add tools.jar.
If your Build still fails and shows this error ->
BUILD FAILED C:\Workspace\eclipseFx\AppOne\build\build.xml:82:
Problem: failed to create task or type
javafx:com.sun.javafx.tools.ant:resources
It means ${java.home} is pointing to the JRE and can access jfxrt.jar but fails to access ant-javafx.jar. Find the absolute path for ant-javafx.jar in your JDK and edit that line in build.xml and it should build fine. This error has been fixed in the Nightly Build.
P.S. - You can also create JavaFX RCP applications now. Eclipse 4 Applications can use JavaFX as the rendering technology instead of SWT.

Eclipse - Adding a Jar File to a existing Project

I am running Eclipse 3.7. I am currently working on a Plug-In Project for a Application called Team Center. I was recently made aware of a jar file of SWT Widgets named Opal. So I am trying to figure out how to add the Jar File to my existing project. I have tried many different ways to do this. Nothing has worked so far.
Here are some of the things I have tried.
Made a lib directory in my current project copied the jar file
Build Path Configure -> Libraries -> Added the Jar
Runtime tab -> Add -> selected the lib/jar file -> update build path
Saved
My project still compiles, but at runtime it fails and I get can't load proxied handler errors
I have tried to create a plugin project just for the Jar File, then add the opal plugin to required Plug-ins. If the Opal project is closed, that reflects with the Opal plugin in my project.
Here is the way my current project works. It is a plug-in project and when I finish or change code.
Build Project
Export
Deployable plug-ins and fragments
Select my project plug-in
Finish
Then I copy the project.jar to the TeamCenter Application plug-ins directory
I am assuming that somehow I have to include the opal.jar in the project.jar. But right now I am at a total lost on how to do it.
In Eclipse Plugin Project click on your MANIFEST.MF file and go to the runtime tab. There should be a section "Classpath". Try to add your lib there.
UPDATE
I've tried it and it has worked for me. I've executed following steps:
create new Plug-In project
create new lib folder in it
copy opal lib to the folder
open the MANIFEST.MF, go to the Runtime tab and add the lib to the Classpath section
check whether the lib folder is recognized of the build process (Build tab and lib folder should be checked)
Create new Run Configuration (Run -> Run Configuration... -> double click on OSGi Framework)
on Bundles tab check the new made project (Workspace section) and uncheck Target Platform for now
mark the new project and click on the button Add Required Bundles on the right side
now some needed bundles to run your project should be checked in the Target Platform section
click Apply, then Run and your OSGi env will be started
check build.properties in your plugin. check lib folder should be included there.
open plugin.xml or MANIFEST.MF in editor, you see build Tab. In the binary build, make sure your lib folder is checked.

Properly adding a Facebook jar in Eclipse for Blackberry

How to add Facebook .jar file properly in eclipse for blackberry
"ERRO :Module 'FacebookBlackBerrySDK-v0.8.25' not found."
Below is the step to add the jar properly to your eclipse project. Its seems that you are not adding the jar properly in your eclipse environment. So check the step please.
Create a folder called “lib” (or whatever you want to call it) under your project, and copy the downloaded JAR files into that folder.
Right-click your project > Properties
Java Build Path > Libraries > Add JARs… > Choose the JAR files in the “lib” folder
Java Build Path > Order and Export > Check the JAR files

How to create a Jar file in Netbeans

Well I have my source code that i have done using the IDE netbeans. Now I wanted to move this java application to a web application. For that I need to create a jar file from my source code, so that I could invoke it in ma jsp file.
I have not been able to find any option in netbeans or any other way to create a .jar file of this source code.
Could someone tell me how to do that.
Thanks
Create a Java archive (.jar) file using NetBeans as follows:
Right-click on the Project name
Select Properties
Click Packaging
Check Build JAR after Compiling
Check Compress JAR File
Click OK to accept changes
Right-click on a Project name
Select Build or Clean and Build
Clean and Build will first delete build artifacts (such as .class files), whereas Build will retain any existing .class files, creating new versions necessary. To elucidate, imagine a project with two classes, A and B.
When built the first time, the IDE creates A.class and B.class. Now you delete B.java but don't clear out B.class. Executing Build should leave B.class in the build directory, and bundle it into the JAR. Selecting Clean and Build will delete B.class. Since B.java was deleted, no longer will B.class be bundled.
The JAR file is built. To view it inside NetBeans:
Click the Files tab
Expand Project name >> dist
Ensure files aren't being excluded when building the JAR file.
Please do right click on the project and go to properties.
Then go to Build and Packaging.
You can see the JAR file location that is produced by defualt setting of netbean in the dist directory.
I also tried to make an executable jar file that I could run with the following command:
java -jar <jarfile>
After some searching I found the following link:
Packaging and Deploying Desktop Java Applications
I set the project's main class:
Right-click the project's node and choose Properties
Select the Run panel and enter the main class in the Main Class field
Click OK to close the Project Properties dialog box
Clean and build project
Then in the fodler dist the newly created jar should be executable with the command I mentioned above.
Now (2020) NetBeans 11 does it automatically with the "Build" command (right click on the project's name and choose "Build")