java.lang.NoClassDefFoundError: java.awt.Container
Asked Answered
B

7

11

I am trying to install Visual Paradigm for UML. During the installation it crashes. This is the stack trace:

Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
java.lang.NoClassDefFoundError: java.awt.Container
    at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(Unknown Source)
    at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.<init>(Unknown Source)
    at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.<init>(Unknown Source)
    at com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
    at com.install4j.runtime.installer.Installer.runInProcess(Unknown Source)
    at com.install4j.runtime.installer.Installer.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.install4j.runtime.launcher.Launcher.main(Unknown Source)
java.lang.NoClassDefFoundError: java.awt.Component
    at javax.swing.ImageIcon.<clinit>(Unknown Source)
    at com.install4j.runtime.installer.frontend.GUIHelper.loadIcon(Unknown Source)
    at com.install4j.runtime.installer.frontend.GUIHelper.<clinit>(Unknown Source)
    at com.install4j.runtime.installer.helper.InstallerUtil.reportException(Unknown Source)
    at com.install4j.runtime.installer.Installer.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.install4j.runtime.launcher.Launcher.main(Unknown Source)

It appears that the installer can't find a class in the WT library. I can't see how how that can be possible. Does anyone know what is causing this, and how I may fix it?

[System Information]

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Bastinado answered 2/1, 2013 at 6:2 Comment(0)
S
6

I was getting the same problem when trying to install Visual Paradigm on Ubuntu 12.10 64 bit.

Java version:

java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

This seemed to fix the problem:

sudo apt-get install ia32-libs

Slovenia answered 18/2, 2013 at 14:1 Comment(1)
When I run this command I get: Package ia32-libs is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: lib32z1 lib32ncurses5 lib32bz2-1.0 E: Package 'ia32-libs' has no installation candidate. I installed those packages but did not work.Showiness
D
19

On ubuntu 14.04 the answer given by Hayden didn't work for me as the package doesn't exist.

This did work though:

apt-get install libxtst6:i386

i.e. it needs the 32 bit version of libxtst

Disposal answered 25/6, 2014 at 13:52 Comment(2)
I'm also on Ubuntu 14.04, and this was the solution for me.Shrine
if fixed my problem, installing SOAPUI 5 on ubuntu 14.10 64bits, thanksIndecency
U
9

I have had the same problem installing SoapUI software and this command works for me:

$ ./soapUI-x32-4.6.0.sh -J-Djava.awt.headless=true

My system:

Linux 3.10-2-amd64 #1 SMP Debian 3.10.7-1 (2013-08-17) x86_64 GNU/Linux

And my JVM version:

$ java -version
    java version "1.6.0_30"
    Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
Ulm answered 1/10, 2013 at 13:26 Comment(0)
S
6

I was getting the same problem when trying to install Visual Paradigm on Ubuntu 12.10 64 bit.

Java version:

java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

This seemed to fix the problem:

sudo apt-get install ia32-libs

Slovenia answered 18/2, 2013 at 14:1 Comment(1)
When I run this command I get: Package ia32-libs is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: lib32z1 lib32ncurses5 lib32bz2-1.0 E: Package 'ia32-libs' has no installation candidate. I installed those packages but did not work.Showiness
O
5

Run the script with -J-Djava.awt.headless=true

sh SoapUI-x32-5.0.0.sh -J-Djava.awt.headless=true

Outface answered 20/10, 2014 at 4:27 Comment(0)
P
2

Run this command on Ubuntu18.04

sudo apt-get update
sudo apt-get install libxi6 libxtst6 libxrender1
Palaestra answered 20/3, 2019 at 5:44 Comment(1)
That did the trick! libxrender1 was required for sure, the other two libraries I haven't tried to not install.Speculation
D
0

In my opinion, This could be problem with OpenJDK. try switching to official Oracle/Sun JDK with this command.

sudo update-java-alternatives -s java-6-sun
Dawson answered 2/1, 2013 at 6:16 Comment(2)
I tried your recommendation. but got the following response: update-java-alternatives: directory does not exist: /usr/lib/jvm/java-6-sunBastinado
Oh, could you please check whether you've SUN/Oracle JDK installed on the box?Dawson
T
0

You may use

`sudo update-java-alternatives -s java-6-oracle`

Instead of using

`sudo update-java-alternatives -s java-6-sun`

or try to change 6 with the version of Java that you used.

Tahiti answered 29/10, 2013 at 7:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.