Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've recently installed Ubuntu 11.04 and downloaded the "Sweet Home 3D" program from the Software Center. It installed and it shows up as one of the applications when I search for it, but I cannot get it to start at all. Any idea how I can do this or if this is a known issue?

I am using a Dell Studio 15 1558 laptop and the fglrx driver for my ATI graphics card. But I have a feeling that this problem has nothing to do with hardware or drivers.

Edit: This is what I get when I type 'sweethome3d' in the terminal:

zeiger@ubuntu:~$ sweethome3d
[warning] /usr/bin/sweethome3d: Unable to locate /usr/lib/jvm/java-6-sun/jre/lib/javaws.jar in /usr/share/java
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jnlp/UnavailableServiceException
Caused by: java.lang.ClassNotFoundException: javax.jnlp.UnavailableServiceException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: com.eteks.sweethome3d.SweetHome3D. Program will exit.
zeiger@ubuntu:~$

And I installed SweetHome3d using the Ubuntu Software Center.

share|improve this question
4  
Can you try to start the program from the terminal? This will likely help you track down where the software is breaking. –  Marco Ceppi Jun 14 '11 at 14:04
    
I think that incompatibility with FGLRX could be a reason, but I am just guessing. As Marco suggested, run Terminal, execute sweethome3d and show us output (possibly using paste.ubuntu.com ) - if there's any. –  jnv Jun 14 '11 at 14:42
    
The console idea is great, but how have you installed it?. Sweet Home 3D packs it's own jre, I had to grant it run privileges to be able to launch it. –  Javier Rivera Jun 14 '11 at 17:05
    
@MarcoCeppi @jnv @JavierRivera I have updated the question with the information required –  zeiger Jun 14 '11 at 20:21
add comment

4 Answers 4

up vote 9 down vote accepted

Install sun-java6-bin from the Software Centre.

I have Sweet Home installed. When I remove sun-java, SH doesn't launch. When I reinstall it, SH launches.

share|improve this answer
    
Thanks, this worked! –  zeiger Jun 14 '11 at 23:10
add comment

The problem seems to be that the launch script located in /usr/share/sweethome3d/sweethome3d.sh looks for jre installed on a hardcoded path to "/usr/lib/jvm/java-6-sun".

To fix it:

  1. On Ubuntu, open terminal and run:

    sudo gedit /usr/share/sweethome3d/sweethome3d.sh

  2. Change the line:
    find_jars /usr/lib/jvm/java-6-sun/jre/lib/javaws.jar
    to
    find_jars $(readlink -f /usr/bin/java | sed "s:bin/java::")/lib/javaws.jar

  3. Save the script.
  4. Try to run the app!
share|improve this answer
add comment

Resolution:

  1. Downloaded jre-6u27-linux-i586.bin and install it.
  2. As root, copy ~/Downloads/jre1.6.0_27/lib/javaws.jar to /usr/lib/jvm/default-java/jre/lib.
  3. As root, create a link ln -s default-java java-6-sun.
  4. Run sweethome3d.

It worked at least for me.

share|improve this answer
3  
This a quite worse solution than the accepted one. Not only are you using a manual download instead of using repositories, you are copying this over the the already installed version. You can have all kind of fun with this setup if the normal system updates decide to update their java. –  Javier Rivera Sep 20 '11 at 17:49
add comment

I think this is caused by SweetHome3D, which looks for Sun java files directly.

I put javaws.jar from another package as file to /usr/lib/jvm/java-6-sun/jre/lib/javaws.jar then, the problem seems solved, SweetHome3D started.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.