Jared's Linux Blog

Entries in Aptana (1)

Aptana requires Sun JRE 1.5 error in Eclipse

On my somewhat fresh install of Ubuntu 9.04 I installed Eclipse 3.2 using Synaptic.  After installing the Aptana plugin, I kept getting the error:

Aptana requires Sun JRE 1.5 or greater to work properly. Some functionality may be disabled or work not properly under current JRE...

Aptana 3.2 Sun JRE 1.5 error

As an aside, I could be wrong but I don't think the message is proper English.  "...may be disabled or work not properly..." should be something like "...may be disabled or work improperly..." or "...may not be enabled or work properly...".

Anyway, the Ubuntu forums had a great fix for this error.  Just do the following:

Compiling Aptana may not work, and even if it did, running it under Eclipse is much more efficient and functional. Here are the steps I took to install it.

  1. Install the version of Java you wish to use. In this example I use Sun Java 6:
    sudo apt-get install sun-java6-jdk
  2. Now install eclipse:
    sudo apt-get install eclipse
  3. Don't click on the Eclipse menu item yet!. We need to edit the menu entry for eclipse so it will use the desired Java. If you don't do this it will use Blackdown Java, no matter what "java -version" says.
    1. Right click over your main gnome menu and Click on "Edit Menus"
    2. In the left column of the box that pops up click on "Programming"
    3. Now in the right column double click "Eclipse".
    4. Put "/usr/bin/eclipse -vm /usr/lib/jvm/java-6-sun-1.6.0.00/bin/java" in the "Command:" line.
    5. Click "Close", and then "Close" again to exit the main menu editor.
  4. Now run "eclipse -vm /usr/lib/jvm/java-6-sun-1.6.0.00/bin/java" from the command line. If you get a message that says "Could not create /usr/local/lib/eclipse/.eclipseextension. Please run as root: ...". then just run the following commands after exiting Eclipse to fix things:
    • sudo touch /usr/local/lib/eclipse/.eclipseextension
    • sudo chmod 2775 /usr/local/lib/eclipse/.eclipseextension
    • sudo chown root:staff /usr/local/lib/eclipse/.eclipseextension
  5. Now we can use the menu. Select "Programming->Eclipse" to start eclipse.
  6. Next we need to set the Java that Eclipse will use for it's projects (Aptana is an Eclipse project). Otherwise it will only use Blackdown Java (regardless of java -version or the VM it is started with).
    • From the "Window" menu in Eclipse select "Preferences".
    • Click "Java" to open the java options list and click "Installed JRE's"
    • Now you can enter as many JRE's as you want and select the default. We'll just enter Java 6, click on the "Add" button.
    • Enter "/usr/lib/jvm/java-6-sun" in the "JRE home directory:" box and click the "OK" button. Everything else will fill in automatically.
    • Click the check box by java-6-sun to set it as the default.
    • Click "OK" to exit Preferences.
  7. From the Help menu in Eclipse, select Software Updates > Find and Install... to open an Install/Update pop-up window.
  8. On the Install/Update pop-up window, choose the Search for new features to install option, and click the Next button.
  9. Set up a new remote site to scan for updates.
    • Click the New Remote Site... button to open a New Update Site pop-up window.
    • On the New Update Site pop-up window, type "Aptana" in the site Name text box.
    • In the URL text box, type the URL for the Aptana update site: http://update.aptana.com/update/ and click OK.
    • Click the Finish button to open an Updates window.
  10. Now we'll install the Aptana plugin
    • On the Updates window, check the Aptana box, and click the Next button.
    • Choose the option to accept the terms of the license agreement, and click the Next button.
    • Click the Finish button.
    • Click the Install All button.
    • After Eclipse installs the Aptana plug-in, follow the prompts to shut down and re-start Eclipse.
  11. Finally we need to set the Ecplise Perspective to Apatana

In the upper right hand corner of the Eclipse IDE there is a little window icon, this is used to select perspectives. Click it, and if you see "Aptana" just select it. Otherwise select "Other..." to open the Select Perspective pop-up window and select Aptana from there. That's it!.

Posted on Friday, June 19, 2009 by Registered CommenterJared in , , , | CommentsPost a Comment