How to Instal JavaFX 1.1 plug-in for Eclipse on Linux
>> 20 February 2009
A plug-in for JavaFX is available on " Project Kenai’s " site.
I've tested this plug-in on Linux using JavaFX SDK 1.01 and 1.1 and it works fine
Download the Plug-in
http://kenai.com/projects/eplugin/pages/Home
You can download a plug-ins for Linux, Windows and Mac or you can use "Update" to install the plug-in online.
Note :
This project is referenced on Sun's Web site
Download :
com.sun.javafx.eclipse.feature-linux-gtk-x86-1.0.1.zip
Download and Install Eclipse IDE for Java EE Developers
If you want a full functional plug-in you must install this bundle. Otherwise you cannot get the "Snippets" in Eclipse.
http://www.eclipse.org/downloads
Install 32 or 64 bits according to your Linux version
System Requirements
- JDK 6 Update 12 or later
- JavaFX SDK 1.1 or (1.01) installed
- Eclipse IDE for Java EE Developers
- Eclipse Plug-in for JavaFX
" com.sun.javafx.eclipse.feature-linux-gtk-x86-1.0.1.zip "
Please see :
Installer JavaFX 1.1 SDK sur Linux
http://java-javafx-iipt.blogspot.com/2009/02/installer-javafx-11-sdk-sur-linux.html
Installer JavaFX SDK sur Linux
http://java-javafx-iipt.blogspot.com/2009/02/installer-javafx-sdk-sur-linux.html
Installing Eclipse
All you have to do is to gunzip the file to get Eclipse installed
$ tar -zxvf eclipse-jee-ganymede-SR1-linux-gtk-x86_64.tar.gz
Note :
Although installing the plug-in can be done simply by gunzipping and unzipping components in the same directory as follows, it’s recommended to install plug-ins using "Update Softwares" in Eclipse
$ tar -zxvf eclipse-jee-ganymede-SR1-linux-gtk-x86_64.tar.gz
$ unzip com.sun.javafx.eclipse.feature-linux-gtk-x86-1.0.1.zip
$ eclipse/eclipse -clean
Preparing for Installing the Plug-in
Create a directory for the plug-in, copy and unzip. We will use this directory later in "Update Softwares"
$ mkdir eclipse_plugin
$ cp com.sun.javafx.eclipse.feature-linux-gtk-x86-1.0.1.zip eclipse_plugin
$ cd eclipse_plugin
$ unzip com.sun.javafx.eclipse.feature-linux-gtk-x86-1.0.1.zip
Start Eclipse
$ Eclipse_Root_Directory/eclipse
Note :
When you gunzip the Eclipse.xx.tar.gz you get a directory called "eclipse" this is the defaut I have kept this in the examples
Installing the Plug-in
" Help " -> Software Updates
Click on " Available Software " tab -> " Add Site "
Click on " local "
Browse to the directory where you unzipped the plug-in
This was done above in " eclipse_plugin "
Right click on JavaFX Features -> Install
Note :
Select JavaFX Features before right clicking
Click on " Next "
Read the license and " Finish "
Restart Eclipse
Create a Java Project
File -> New -> Project
Select " Java Project " -> " Next "
Enter Project Name
Click on " Finish "
Click Yes to open Java Perspective
Add " Java Nature "
Right click the newly created Java Project -> JavaFX -> Add JavaFX Nature
Error Message !!!
The error message indicate simply that JavaFX SDK was not found
Click on "OK" to browse to your installed JavaFX SDK and configure
" JAVAFX_HOME "
Select JAVAFX_HOME (empty) in " Classpath Variables " -> click on "Edit"
Click on " Folder " -> Select your JavaFX SDK directory
This can be JavaFX SDK 1.1 or 1.01
Select JavaFX SDK folder -> OK
JavaFX SDK folder is selected
Click on " OK "
Another " OK " to quit " Classpath Variables " dialog
Add a Package and a Script in the Project
Right click on " src " -> New -> Package
Enter your package Name and " Finish "
Add a JavaFX Script
Right click your package -> New -> Empty Script
Give a Name to the Script
Enter " Main " JavaFX (file name is " Main.fx ")
Click on " Finish "
The script is opened in the editor
Add a " Stage "
Click on " Stage " -> keep your finger on the button -> move and drop inside the editor
Note :
You can also right click on " Stage " in the Snippets -> " Insert "
Set some properties if you like
Click on " Insert "
Add a component to the Stage
Run the script
Always save your work.
Right click on " Main.fx " -> " Run As " -> " JavaFX Application "
Run configuration dialog is opended
Click on " Run " to run the script
Et voilà. All is OK
Thanks for reading :)
0 comments:
Post a Comment