Showing posts with label ide. Show all posts
Showing posts with label ide. Show all posts

Friday, 14 June 2019

Installing Java FX in Eclipse IDE


Getting JavaFX to work in Eclipse IDE these days is a bit tricky since JavaFX aren't included in the JDK and Eclipse is not set up from start to work with FX Applications.
JavaFX is now a seperate project.

Step 1: Install the latest Java JDK.
Step 2: Install the latest version of Eclipse (I used version 2019-06).
Step 3. Install JavaFX
Step 4: Add e(fx)clipse Runtime and IDE to Eclipse IDE
Step 5. Start a new JavaFX project.


STEP 1 - Install the latest JDK (Java Development Kit)

1. Download the JDK from Oracle's website at: https://www.oracle.com/technetwork/java/javase/downloads/index.html  download a suiting Java Platform standard edition JDK for your operating system.
2. Install the JDK to your system
3. Set the environment variable for Java JDK

STEP 2 - Install the latest Eclipse IDE

Download the latest Eclipse IDE from https://www.eclipse.org/
Install Eclipse to your system.

STEP 3 - Install the latest JavaFX

Download the latest JavaFX from https://openjfx.io/
Extract JavaFX files. I extracted them to my Java library to keep all Java related files in the same folder.

STEP 4 - Install e(fx)clipse Runtime and IDE to Eclipse IDE


This is all done in Eclipse.

1. Install the e(fx) runtime for Eclipse.
Open Help/install new software
At work with add following site: http://download.eclipse.org/efxclipse/runtime-nightly/site
Select and install FX Runtime and FX Target

2. Install the e(fx) IDE for Eclipse.
 Open Help/install new software
At work with add following site: http://download.eclipse.org/efxclipse/updates-nightly/site
Select the software for e(fx)clipse and install
Restart Eclipse

3. Check for new updates.
Open Help/check for updates

In Eclipse go to Eclipse/preferences/Java/Build Path/User Libraries/
Press new and enter a name for example JavaFX12, then OK.
Then Add external JARs  to this library, navigate to the lib folder for your JavaFX installation and choose all the included JARs.

Links

https://projects.eclipse.org/projects/technology.efxclipse
https://www.eclipse.org/efxclipse/index.html
https://wiki.eclipse.org/Efxclipse/Tutorials/AddingE(fx)clipse_to_eclipse

Runtime Updatesite:
http://download.eclipse.org/efxclipse/runtime-nightly/site

IDE Updatesite:
http://download.eclipse.org/efxclipse/updates-nightly/site

Step 5 Create a new JavaFX project


I created a JavaFX project to test if it was working. It didn't. I had the following error.

Error: Could not find or load main class application.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

Add JavaFX library to project

I needed to change my Build Path for the project. I added my user library for JavaFX which was not included automatically.

Add VM argument to project

I also had to add a VM argument to my JavaFX project in Eclipse. This was described on JavaFX website.
https://openjfx.io/openjfx-docs/

In the project you choose "Run As" / Arguments
In VM Arguments you add this (but make sure to set this path correct for your JavaFX files);

--module-path "C:\Program Files\Java\javafx-sdk-12.0.1\lib" --add-modules javafx.controls,javafx.fxml

If someone knows how to fix so that this works without having to set each project with module path please let me know.
Share:

Tuesday, 10 July 2018

How to install UMLet plugin for Eclipse

This post is updated 2019-07-15 for Eclipse IDE version 2019-06

UML is essential when developing applications. To have a UML editor right inside of Eclipse IDE is beneficial since you don't have to switch between programs when checking a UML design or the other way when adjusting an existing UML design when implementing details in the classes you write inside the IDE.

UMLet plugin for Eclipse is a good place to get started with UML design. It can also be used as a standalone UML editor.

I had some issues installing the UMLet plugin for Eclipse IDE but found the following way to work for me. I installed umlet plugin version 14.3.

1. Download the .zip file UMLet plugin for eclipse from UMLet Website.

2. Unzip the file and locate the JAR file for the plugin. It is located in a plugin folder.

3. Move the com.umlet.plugin-**.*.jar file to your "eclipse/dropin" directory.





4. Start or restart Eclipse IDE.

5. Choose "File/New/Other/Other/" and Umlet diagram. Or press Ctrl + N then Other and Uml diagram.

6. Then your good to go from here. It's a great plugin!


On the UMLet website it said that you should put the file in the plugin directory. This did not work for me.





Resources:
UMLet FAQ
UMLet versions and downloads
Github for Umlet - Common Problems
Share:

Search