How to use JavaFX 2 SDK in Eclipse? - eclipse

I have installed JavaFX 2.0 SDK and now I would like to do an JavaFX application with Eclipse. But how can I use the javafx.* classes in Eclipse?
The official JavaFX Eclipse plugin seem to be for JavaFx 1.2 and outdated.
When I try to install e(fx)clipse plugin, I get this error:
Cannot complete the install because one or more required items could not be found.
Software being installed: efxclipse 0.0.8.201111131640 (at.bestsolution.efxclipse.feature.feature.group 0.0.8.201111131640)
Missing requirement: Eclipse DI integration for JavaFX 0.0.8.201111131640 (at.bestsolution.efxclipse.runtime.di 0.0.8.201111131640) requires 'bundle org.eclipse.e4.core.contexts 0.9.0' but it could not be found
Cannot satisfy dependency:
From: efxclipse 0.0.8.201111131640 (at.bestsolution.efxclipse.feature.feature.group 0.0.8.201111131640)
To: at.bestsolution.efxclipse.runtime.feature.feature.group [0.0.8.201111131640]
Cannot satisfy dependency:
From: FX Runtime 0.0.8.201111131640 (at.bestsolution.efxclipse.runtime.feature.feature.group 0.0.8.201111131640)
To: at.bestsolution.efxclipse.runtime.di [0.0.8.201111131640]

There are two options:
1) EDIT: Since 7u35 (or smth near it) JavaFX was included into base JDK classpath so you can use JavaFX classes right away.
Just set up your projects to use fx libs:
JavaFX 2.0 API is pure Java. So you can create a new Java project and add sdk-path/rt/lib/jfxrt.jar to libraries to use JavaFX in that project.
For cobundled builds in JDK7 path would be next jdk-path/jre/lib/jfxrt.jar
2) Use e(fx)clipse plugin: http://www.eclipse.org/efxclipse/index.html

You can use e(fx)clipse! You can find it here: http://www.eclipse.org/efxclipse/index.html
After download you must to configure the IDE with your JavaFX SDK(must be installed).
All you need to do is to open Window > Preferences > JavaFX and configure the location of your JavaFX-SDK.
You ussualy have it in Program Files > Oracle.
Hope this will help you!

Based on Sergey Grinev solution, I noticed that we can define this once for all java projects.
Go to Preferences -> Java build path
Select the jvm which is supposed to support javaFx (but whose feature is not yet recognized in Eclipse) and Edit it
Add the sdk-path/rt/lib/jfxrt.jar to it
This way, all your java projects based on this JVM version can support JavaFx and even your older projects (Select each project build path and eventually replace the old jvm with the jvm that you've just edited)

To access JavaFx in Java8 with Eclipse Luna (4.4):
Go to Build Path/ JRE/ Access rules/ Edit/ Add/ Accessible: javafx/**
This seems better than editing the classpath file manually or adding the JAR (again) to the build path.

As an aside, it says it won't install the FX plugin because you are missing org.eclipse.e4.core.contexts bundle. Were you trying to install it into Eclipse Indigo, or 3.8? Or did you follow the instructions on the website and download eclipse 4.2 before you started?

If you don't mind working with java 8, you won't have to jump through any hoola hoops. Just set that as your default jre and javafx imports work out of the box.

To install the e(fx)clipse tooling into your already existing Eclipse you have to add an Update site.
There's no released yet available so you need to add the nightly update-site http://download.eclipse.org/efxclipse/updates-nightly/site

I installed Eclipse Neon.1 (4.6.1)
Then Help => Eclipse Marketplace
On find specify "javaFX" and install "e(fx)clise 2.4.0"

Related

eclipse xtext plugin versions compatibility with eclipse IDE

I made a plugin in eclipse juno using xtext, I package my plugin using the following tutorial: http://www.vogella.com/articles/EclipsePlugIn/article.html#p2deployplugin ... sec 6.Create update site for your plug-in and I install it in the same version of eclipse IDE and the installation was successful. I need install it in others versions of eclipse's (Helios, Galileo, etc.) but when i try to install in Helios appear the following message:
Cannot complete the install because one or more required items could not be found.
Software being installed: MView Source 1.0.0.201308011127 (MView.feature.group 1.0.0.201308011127)
Missing requirement: MView Source 1.0.0.201308011127 (MView.feature.group 1.0.0.201308011127) requires 'org.eclipse.xtext 2.0.0' but it could not be found.
I searched for org.eclipse.xtext 2.0.0 jar to add to the dependencies but i dont found it.
I don't know if this will work but I wanted to ask if there are some way to make my plugin compatible with various versions of eclipse IDE and how. compatible with backward versions and forward versions. I would appreciate any information about it. Sorry for my English Thank you very much. =)
If an Eclipse installation does not contain Xtext, you need to provide Eclipse with the URL of the plugin repository (sometimes called update site) where it is located. That will enable Eclipse to discover and install your dependencies when installing your plugin. You can find the URLs that you need on Xtext website.
http://www.eclipse.org/Xtext/download.html
Try to see the version of XTEXT plugin in both of eclipse instalations:
Help > About Eclipse > Installation Details.
In Plugins tab, search for Xtext UI Core
Sorry my english.
A complete overview on:
All XText versions
The dependent XText core component versions
The corresponding Eclipse platform version
Links to the appropriate download / update sites
can be found here: XText versions, dependencies and Eclipse platform matrix
An pretty useful example for a target platform configuration is there as well!

MTJ 1.1.2 plugin couldn't be installed on Eclipse Juno (4.2)

MTJ (Mobile Tools For Java, a famous J2ME plugin for Eclipse) 1.1.2 couldn't be installed on Eclipse Juno (4.2).
I use the following update url to install the plugin:
Mobile Tools For Java - http://download.eclipse.org/mtj/updates/1.1.2/stable/
But it failed to be installed with dependency error:
Cannot complete the install because one or more required items could not be found.
Software being installed: Mobile Tools for Java 1.1.2.201101310801 (org.eclipse.mtj.feature.group 1.1.2.201101310801)
Missing requirement: MTJ Core Plug-in 1.2.1.201101310801 (org.eclipse.mtj.core 1.2.1.201101310801) requires 'bundle org.mortbay.jetty.server [6.1.0,7.0.0)' but it could not be found
Cannot satisfy dependency:
From: Mobile Tools for Java 1.1.2.201101310801 (org.eclipse.mtj.feature.group 1.1.2.201101310801)
To: org.eclipse.mtj.core [1.2.1.201101310801]
Does anyone know what's the problem of this?
I try to find a plugin containing the bundle "org.mortbay.jetty.server [6.1.0,7.0.0)", but not found.
If you read these release notes you will find the key:
http://docs.oracle.com/javame/dev-tools/jme-sdk-3.2/release-notes/pdf/release-notes.pdf
Install the MTJ toolkit.
Go to Help > Install New Software.
In the “Work with” field, enter this URL: http://download.eclipse.org/releases/indigo
Click Add. When the plugins are discovered, open the Mobile and Device Development Tools
hierarchy and check Mobile Tools for Java Examples and Mobile Tools for Java SDK. Click Next.On the installation screen select all plugins and click Finish then click OK.
A Juno plugin named org.eclipse.jetty.server_.jar conflicts with the MTJ libraries when the plugin version is higher than 6. If it is you must prevent it from loading by changing its name so the Jar file is
not parsed. Locate the file in your Juno installation’s \plugins directory and change the extension from .jar to something else.
For example, change it to: org.eclipse.jetty.server_.old
here is the indigo update site http://download.eclipse.org/releases/indigo/ . FFF is right just install plugin from indigo, it works fine.
"Eclipse Juno" chapter on JAVA ME page on Oracle website states:
A Juno plugin named org.eclipse.jetty.server_(version).jar conflicts with the MTJ libraries when the plugin version is higher than 6. If it is you must prevent it from loading by changing its name so the Jar file is not parsed. For example, change it to: org.eclipse.jetty.server.old
Worked for me.
add indigo repo, it'll install but still a no go
recommend using older version if you need it

Using Eclipse 3.7 for developing Plugin based on Eclipse RCP 3.5

is it possible to use Eclipse 3.7 IDE for developing for the 3.5 platform? Or must I use Eclipse 3.5 IDE?
When I try to switch from Eclipse 3.5 IDE to 3.7 I get errors on projects, which were ok before:
Archive for required library: 'C:/.../.metadata/.plugins/org.eclipse.pde.core/.external_libraries/xyz/os/win32/x86' in project 'projectname' cannot be read or is not a valid ZIP file projectname
What do I have to do to exchange the 3.5 IDE with a current one, but still develop for the 3.5 platform?
I hope my explanation did make sense and was understandable :)
Additional Info:
- I never used the RCP before, now I must use it
- It's no option to upgrade the target platform (3.5)
- I searched the net and stackoverflow, but found no answers for using 3.7 and develop for target platform 3.5 (maybe nobody else has these problems or I used the wrong queries)
Cheers
Kai
Use the menu
Window > Preferences:
Plug-in development > target platform
Here you can add your eclipse 3.5 as a target platform, and then set it active.
But I don't think this will solve the errors you mentioned. I think those errors are because you are using the old workspace folder, and there is something not compatible with eclipse3.7. So maybe you can try to switch to a new workspace, and import your projects there.
I just resolved my problem :-)
In my case, there was a plugin jar, that contained the java sources:
jar
com
META-INF
src
plugin.xml
It seems like eclipse is putting jars inside of plugin jars in the following directory:
[WORKSPACE]\.metadata\.plugins\org.eclipse.pde.core\.external_libraries\...
For my plugin, it tried to put the src folder in this directory - which somehow failed.
After deleting the src folder inside the jar, the errors were gone.
RCP == bag of pain :-)

How can I upgrade from Eclipse Java SE version to Eclipse for Java EE via Eclipse?

I downloaded Eclipse plain Java version and now I realize that I need of Eclipse IDE for Java EE Developers distribution.
I'm new in Eclipse world and I would to know if it is possible (and how) to install Java EE plugins via Eclipse.
There is a thread in ServerFault that shows how to install the Java EE pluggins for Eclipse Java EE plugin for Eclipse IDE
Additionally you can:
Help -> Install new software.
Pick the Mars (or the version you have downloaded such as Luna, Kepler, etc) repository
At the bottom there are install options Java EE Development
To get all of the features of the Java EE edition of Eclipse, there are several packages that need to be installed. This page lists all of the packages that are included in the current Java EE version of Eclipse. If you want all of the features of the Eclipse for Java EE developers, go to Help --> Install New Software..., select the update site for your version (e.g. Kepler) from the dropdown menu, and select the checkbox for each item listed on the above page that is not already installed.
You'll probably find the 'getting started guides' here helpful.
You probably will need to download the plug-in. The easiest way to do this would be to:
go to Help -> Install new software.
Pick the Galileo(Change accordingly) repository
All the way at the bottom there are install options for 'Web, XML, and JaveEE Development
... also this is better suited for SO
follow this
Eclipse 3.3 or earlier, it is NOT possible to upgrade the Eclipse platform itself, only its features. So, you could for example upgrade the CVS feature or the PDE feature from 3.2.0 to 3.2.1, but not eclipse.exe itself.
and
Upgrading other features (like CDT, PDT, WTP...) can be done without the need to download a new platform binary, but because many projects align very closely (eg., the Eclipse 3.2 / Callisto or Eclipse 3.3 / Europa release trains) you will likely need to upgrade the Eclipse platform as well.

Installing Eclipse

I am installing Eclipse for RCP and RAP Developers. My old copy went rogue and decided to act up.
So clean install time! Yay! I downloaded the new version, copied it to the opt folder, extracted it, and ran it.
For some reason, I can't install any plugins due to some crap error*, and it doesn't have a list of default plugins. I deleted my workspace and the original Eclipse install.
Is there another file that is helping Eclipse keep data from previous installs? I am seeing update sites I added when I was constantly trying to get past this issue.
Also, why can't I install new plugins?
I need a clean install so I can't use the Ubuntu installer.
Any tips are appreciated.
*Cannot complete the install because one or more required items could not be found.
Software being installed: Maven Integration for Eclipse (Required) 0.10.2.20100623-1649 (org.maven.ide.eclipse.feature.feature.group 0.10.2.20100623-1649)
Missing requirement: Maven Integration for Eclipse (Editors) 0.10.2.20100623-1649 (org.maven.ide.eclipse.editor 0.10.2.20100623-1649) requires 'bundle org.eclipse.zest.core 0.0.0' but it could not be found
Cannot satisfy dependency:
From: Maven Integration for Eclipse (Required) 0.10.2.20100623-1649 (org.maven.ide.eclipse.feature.feature.group 0.10.2.20100623-1649)
To: org.maven.ide.eclipse.editor [0.10.2.20100623-1649]
I had the same problem when doing a fresh install of Java EE eclipse (helios, galileo, win32 and win64).
The solution for me was to explicitly open the Java perspective, and doing the install after this. This time the installation worked fine.
I suspect the reason is that after a fresh install not all bundles are loaded (although they are present on disk; a feature of eclipse) so that the dependencies cannot be resolved. Opening the Java perspective or creating a dummy Java project will force to load these bundles. Once a bundle is loaded, its existence is persisted, so this only has to happen once.
This issue was mentioned a number of time on the official websites, but always closed or neglected, probably because the reproducer did not do a fresh install.
Download Eclipse 2018-19 (4.9.0) version as an updated eclipse version and install it! Maven dependency will presented inbuild thing in that model, Right click on project -> properties -> on left pane, Maven will display ! Change your setting there to overcome this error and you can add external JAR'S there