Reputation: 85
When I create a RoboVM Eclipse project, Eclipse gives me an exception:
The selected wizard could not be started.
Plug-in org.robovm.eclipse.ui was unable to load class org.robovm.eclipse.internal.NewCocoaTouchProjectWizard.
An error occurred while automatically activating bundle org.robovm.eclipse.ui
Likewise, I get this message when I try to go to "Settings" > "RoboVM":
Unable to create the selected preference page.
An error occurred while automatically activating bundle org.robovm.eclipse.ui.
I have updated to Java 1.7. I am using Eclipse version 3.7.2 but I faced the same issue when I tried it with Kepler Service Release 2.
This issue is similar to robovm plugin wont work but the responses there didin't solve my issue, as I am already using the latest roboVM and JDK.
Upvotes: 2
Views: 681
Reputation: 18712
This happens when you have lower version of Java as RoboVM expects you to use jdk1.7.x. I had this problem in Mac as Mac used to release its own version. So I downloaded Oracle Java 1.7 and then opened eclipse. Under eclipse Preferences -> Java - Installed JREs, I added the newly installed jdk and made it default, finally removed the Java 1.6 from Installed JREs. Then uninstalled RoboVM. Restarted Eclipse. Re-installed RoboVM. That's it.
Upvotes: 1
Reputation: 6999
What OS are you running Eclipse on? Guessing OSX Mavericks?
I think I had something similar and this resolved it: https://stackoverflow.com/a/21148562/19506. The problem I had was that I had installed Java 7 (as it sounds like you have) and it showed up in Eclipse as available. BUT, Eclipse itself wasn't running Java 7, it was using Java 6. And the plugin will only run in Java 7. I'm using Kepler SR2 fwiw.
I.e. You first install Java 7 (sounds like you did that), but then you have to make sure Eclipse runs with it - not just has it available in the build environment.
One trick was finding eclipse.ini
by doing a right-click on /Applications/eclipse/Eclipse
(or whatever you called it) and choosing Show Package Contents
. Then I added these two lines to the eclipse.ini
file:
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java
immediately before this line:
-vmargs
Then I closed and restarted Eclipse. At this point, the plug-in was able to run.
Hope this helps... It was a few weeks ago and I remember doing this was the biggest stumbling block I had with getting RoboVM running. I just don't remember exactly what the error was!
Upvotes: 2