Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: HOWTO: resolve SWT error in Aptana running on Hardy

  1. #1
    Join Date
    Apr 2007
    Location
    Pompano Beach, FL, USA
    Beans
    69
    Distro
    Ubuntu 13.10 Saucy Salamander

    Post HOWTO: resolve SWT error in Aptana running on Hardy or later

    UPDATE: Thanks EddieA for providing the proper fix for this error

    Symptoms:
    • You get an "An SWT error has occured." when doing various things in Aptana Studio
    • You can't update Aptana, view new messages, or preview code
    • Your running Firefox 3 (default on Hardy)


    Cause:
    Aptana integrates with Firefox 2 only. The errors relate to it not finding some needed libraries

    Resolution 1 (recommended):
    Follow the official install instructions. This will get Aptana working with your current version of Firefox. http://www.aptana.com/docs/index.php...ptana_on_Linux

    Resolution 2:
    Install firefox 2. Note that this will NOT cause any issues with Firefox 3 usage. It is safe to have them both installed. Run the following code and restart Aptana. Everything should work fine.
    Code:
    sudo apt-get install firefox-2

    Sources:
    Last edited by MikeEvans; November 6th, 2008 at 07:04 PM. Reason: Better solution found

  2. #2
    Join Date
    Jun 2008
    Beans
    31
    Distro
    Ubuntu 8.04 Hardy Heron

    Smile Re: HOWTO: resolve SWT error in Aptana running on Hardy

    Holy IDE batman that really worked!

  3. #3
    Join Date
    Jul 2006
    Location
    Surrey, England
    Beans
    75

    Re: HOWTO: resolve SWT error in Aptana running on Hardy

    Although this 'seems' to work (it was what I did too) it means that the browser in your preview window is not FF3 but FF2 which means at least that your CSS will not display properly if you are writing for FF3 as , of course, FF2 is not as CSS compliant.
    I still don't know how to fix this properly.
    Eddie
    EddieA
    What looks large from a distance, close up is never that big: (Bob Dylan, 1983)

  4. #4
    Join Date
    Jul 2006
    Location
    Surrey, England
    Beans
    75

    Re: HOWTO: resolve SWT error in Aptana running on Hardy

    Here's the real fix:
    http://www.aptana.com/docs/index.php...ptana_on_Linux

    Cheers
    Eddie
    EddieA
    What looks large from a distance, close up is never that big: (Bob Dylan, 1983)

  5. #5
    Join Date
    Mar 2008
    Location
    Leeds, England
    Beans
    168
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: resolve SWT error in Aptana running on Hardy

    Hi I am not very confident when it comes to using the terminal so could someone give my a breakdown of how to do this:

    Instead you need to install XULRunner and create a startup script called, say, runAptana.sh in /usr/local/aptana

    I have XULRunner installed but my Aptana is downloaded to /home/susan/Downloads/Aptana/aptana it launches but then I get the SWT error straight away.
    I think I need to do the startup script now.
    Thanks,
    Susan

  6. #6
    Join Date
    Jul 2006
    Location
    Surrey, England
    Beans
    75

    Re: HOWTO: resolve SWT error in Aptana running on Hardy

    Hi Susan
    You may have a different problem if you are getting swt error straight away.
    If you are getting it when you try to preview your code in th FF3 browser here is the fix (in plain English )

    Using your favourite file explorer:
    find your XUL runner directory - make a note of the full path name
    find your aptana (i.e where it is installed) directory ditto pathname
    these paths are the two lines you need to customize the script for your setup.

    create a plain text document and paste the two lines below into it:



    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner
    /home/susan/Downloads/Aptana/aptana
    (NB substitute YOUR xulrunner directory in the first line )
    then save it in your aptana directory as runAptana
    again, using your file browser, navigate to 'runAptana', which is now your launch script, right-click choose 'properties' then 'permissions', and check 'allow executing file as program'
    If you click on the file it should then open Aptana.
    Also modify any launchers or menu item to point to yout new 'runAptana' script.
    Hope it works
    Eddie
    Last edited by EddieA; November 6th, 2008 at 04:28 PM. Reason: clarification
    EddieA
    What looks large from a distance, close up is never that big: (Bob Dylan, 1983)

  7. #7
    Join Date
    Mar 2008
    Location
    Leeds, England
    Beans
    168
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: resolve SWT error in Aptana running on Hardy

    Thanks Eddie, I fear mine may be a seperate error though because it appears as soon as I launch Aptana and then I have to close it straight away without using it at all.

    I tried following your instructions above but Aptana didn't even begin to launch from the created file. This time when I launched it with the original launcher when it asked me whether I wanted to close Aptana I have said no and asked it to download updates so I will have to watch this space and see if it works.

  8. #8
    Join Date
    Jul 2006
    Location
    Surrey, England
    Beans
    75

    Re: HOWTO: resolve SWT error in Aptana running on Hardy

    That's strange - it should launch.
    I omitted the name of the Aptana file (i.e the actual program file) which I believe is AptanaStudio (as capitalized). if your directory is:
    /home/susan/Downloads/Aptana/aptana
    please go to that directory and check that's where AptanaStudio is.
    then the second line should read
    /home/susan/Downloads/Aptana/aptana/AptanaStudio


    if that doesn't work then post all your script here and let's have a look.
    Eddie
    EddieA
    What looks large from a distance, close up is never that big: (Bob Dylan, 1983)

  9. #9
    Join Date
    Aug 2008
    Beans
    2

    Re: HOWTO: resolve SWT error in Aptana running on Hardy

    Resolution 1 didn't seem to work here either. My script looks like this:

    Code:
    #!/bin/bash
    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9
    ./AptanaStudio
    With Aptana studio in that same directory.

    However I ran 'apt-get install firefox-2' and all is well.

  10. #10
    Join Date
    Jul 2006
    Location
    Surrey, England
    Beans
    75

    Re: HOWTO: resolve SWT error in Aptana running on Hardy

    The second line in the script should just be the path to the Aptana start file itself which should reside in your Aptana installation directory. I don't know enough about scripts to know which variations work (i.e.if it would find your start file in your example - in your aptana directory)
    .
    The problem with Firefox 2 is that when you are designing your page in Aptana the preview would not be consistent with viewing your page on FF3 as FF3 is more standards compliant. So your designs would look different on FF3 and you would probably need browser specific workarounds to get FF2 to behave the same.

    The link in post #4 (above) gives the Aptana instructions. If you can't get it to work try Aptana forums too as they are quite helpful.

    Just to clarify finally - you use the script in all your launchers to start Aptana - you don't start it directly.


    Eddie
    Last edited by EddieA; November 14th, 2008 at 06:56 PM. Reason: correction, clarification
    EddieA
    What looks large from a distance, close up is never that big: (Bob Dylan, 1983)

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •