Eclipse did not install AppletViewer

Bug #323763 reported by Bill Richardson
4
Affects Status Importance Assigned to Milestone
eclipse (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: eclipse

I tried to run the Hello World program and got the following message

Exception in thread "main" java.lang.NoClassDefFoundError: sun.applet.AppletViewer
   at gnu.java.lang.MainThread.run(libgcj.so.90)
Caused by: java.lang.ClassNotFoundException: sun.applet.AppletViewer not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/home/richardson/workspace/Project1/], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.90)
   at java.lang.ClassLoader.loadClass(libgcj.so.90)
   at java.lang.ClassLoader.loadClass(libgcj.so.90)
   at gnu.java.lang.MainThread.run(libgcj.so.90)

I then uninstalled eclipse and tried to install it again and the install failed and I cannot uninstall eclipse--even from the command line. When trying to uninstall the following occured

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libjaxp1.3-java libcommons-pool-java junit4 eclipse-jdt libcommons-modeler-java libxerces2-java
  linux-headers-2.6.27-7 linux-headers-2.6.27-9 debhelper eclipse-pde zenity eclipse-rcp
  libservlet2.4-java antlr libcommons-beanutils-java g++-4.3 junit libcommons-launcher-java
  libantlr-java-gcj po-debconf libcommons-logging-java g++ intltool-debian linux-headers-2.6.27-9-generic
  libcommons-collections-java libxerces2-java-gcj libtomcat5.5-java eclipse-platform-gcj gettext ant
  gcj-4.3 libjsch-java ant-optional gjdoc gappletviewer-4.3 libgcj9-dev libcommons-dbcp-java
  liblucene-java libantlr-java libcommons-el-java linux-headers-2.6.27-7-generic eclipse-rcp-gcj
  build-essential libservlet2.3-java dpkg-dev libstdc++6-4.3-dev eclipse-source eclipse-jdt-gcj
  libgcj9-src ant-optional-gcj html2text libcommons-collections3-java patch eclipse-platform
  libmail-sendmail-perl ant-gcj libcommons-digester-java java-gcj-compat-dev libsys-hostname-long-perl
  liblucene-java-doc eclipse-pde-gcj libjaxp1.3-java-gcj
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  eclipse
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 434kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: error processing eclipse (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 eclipse
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
Architecture: amd64
DistroRelease: Ubuntu 8.10
ErrorMessage: Package is in a very bad inconsistent state - you should
Package: eclipse 3.2.2-5ubuntu2
SourcePackage: eclipse
Title: package eclipse 3.2.2-5ubuntu2 failed to install/upgrade: Package is in a very bad inconsistent state - you should
Uname: Linux 2.6.27-11-generic x86_64

Revision history for this message
Bill Richardson (squareroot) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

eclipse only installs dependencies which are required to run eclipse. It doesn't install build dependencies for programs which you develop.

Changed in eclipse (Ubuntu):
status: New → Invalid
Revision history for this message
Eme (eman76) wrote :

Hi All,
     I am experiancing similar problem. In my case I am installing Ilog ceplex and planning to use the JAVA concert technology. so whe I compile the java file (name: LPex1.java) I have no problem but when I try to run it I got the following message

eman@eman-laptop:~$ java -Djava.library.path=/usr/local/ilog/cplex90/bin/i86_linux2_glibc2.3_gcc3.2 LPex1
Exception in thread "main" java.lang.NoClassDefFoundError: LPex1
   at gnu.java.lang.MainThread.run(libgcj.so.90)
Caused by: java.lang.ClassNotFoundException: LPex1 not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/ilog/cplex90/lib/cplex.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.90)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
   at java.lang.ClassLoader.loadClass(libgcj.so.90)
   at java.lang.ClassLoader.loadClass(libgcj.so.90)
   at gnu.java.lang.MainThread.run(libgcj.so.90)

Notice that I am specifying the LD_library Path in the java command line!

I was serching on the net and I found alot of similar bugs for different types of lib files and one suggestion was to download the JDK od SUN which I wasn't sure if it would be the solution of my problem.

Please help if you know the solution.

Revision history for this message
Niels Thykier (niels-thykier) wrote : Re: [Bug 323763] Re: Eclipse did not install AppletViewer

Eme wrote:
> Hi All,
> I am experiancing similar problem. In my case I am installing Ilog ceplex and planning to use the JAVA concert technology. so whe I compile the java file (name: LPex1.java) I have no problem but when I try to run it I got the following message
>

Hi Eme

> eman@eman-laptop:~$ java -Djava.library.path=/usr/local/ilog/cplex90/bin/i86_linux2_glibc2.3_gcc3.2 LPex1
> Exception in thread "main" java.lang.NoClassDefFoundError: LPex1
> at gnu.java.lang.MainThread.run(libgcj.so.90)
> Caused by: java.lang.ClassNotFoundException: LPex1 not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/ilog/cplex90/lib/cplex.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
> at java.net.URLClassLoader.findClass(libgcj.so.90)
> at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
> at java.lang.ClassLoader.loadClass(libgcj.so.90)
> at java.lang.ClassLoader.loadClass(libgcj.so.90)
> at gnu.java.lang.MainThread.run(libgcj.so.90)
>
> Notice that I am specifying the LD_library Path in the java command
> line!
>
> I was serching on the net and I found alot of similar bugs for different
> types of lib files and one suggestion was to download the JDK od SUN
> which I wasn't sure if it would be the solution of my problem.
>
> Please help if you know the solution.
>

Your problem is unrelated to eclipse. Your problem is probably that you
do not add any jars or folders to your classpath. You are most likely
missing a "-cp $jar1:$jar2:...:$jarN" in your command besides the
-Djava.library.path

~Niels

Revision history for this message
Eme (eman76) wrote :
Download full text (5.2 KiB)

When I compile I added the .jar path by the comand:

javac -classpath <path to .jar> LPex1.java

this command works with no errors, but when I write the following command:

java -Djava.library.path=<path_to_shared_library> LPex1

I got the error message that I posted earlied. I think there is a permission problem where the library can not be accessed by the user account! but since I am new to the linux os I don't really know how to solve it!

-----Original Message-----
From: Niels Thykier <email address hidden>
To: <email address hidden>
Sent: Fri, Oct 9, 2009 2:08 pm
Subject: Re: [Bug 323763] Re: Eclipse did not install AppletViewer

Eme wrote:
 Hi All,
      I am experiancing similar problem. In my case I am installing Ilog ceplex
nd planning to use the JAVA concert technology. so whe I compile the java file
name: LPex1.java) I have no problem but when I try to run it I got the
ollowing message

Hi Eme
> eman@eman-laptop:~$ java -Djava.library.path=/usr/local/ilog/cplex90/bin/i86_linux2_glibc2.3_gcc3.2
Pex1
 Exception in thread "main" java.lang.NoClassDefFoundError: LPex1
    at gnu.java.lang.MainThread.run(libgcj.so.90)
 Caused by: java.lang.ClassNotFoundException: LPex1 not found in
nu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/ilog/cplex90/lib/cplex.jar],
arent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
    at java.net.URLClassLoader.findClass(libgcj.so.90)
    at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
    at java.lang.ClassLoader.loadClass(libgcj.so.90)
    at jav
a.lang.ClassLoader.loadClass(libgcj.so.90)
    at gnu.java.lang.MainThread.run(libgcj.so.90)

 Notice that I am specifying the LD_library Path in the java command
 line!

 I was serching on the net and I found alot of similar bugs for different
 types of lib files and one suggestion was to download the JDK od SUN
 which I wasn't sure if it would be the solution of my problem.

 Please help if you know the solution.

Your problem is unrelated to eclipse. Your problem is probably that you
o not add any jars or folders to your classpath. You are most likely
issing a "-cp $jar1:$jar2:...:$jarN" in your command besides the
Djava.library.path

Niels
--
clipse did not install AppletViewer
ttps://bugs.launchpad.net/bugs/323763
ou received this bug notification because you are a direct subscriber
f the bug.
Status in “eclipse” package in Ubuntu: Invalid
Bug description:
inary package hint: eclipse
I tried to run the Hello World program and got the following message
Exception in thread "main" java.lang.NoClassDefFoundError: sun.applet.AppletViewer
  at gnu.java.lang.MainThread.run(libgcj.so.90)
aused by: java.lang.ClassNotFoundException: sun.applet.AppletViewer not found
n gnu.gcj.runtime.SystemClassLoader{urls=[file:/home/richardson/workspace/Project1/],
arent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
  at java.net.URLClassLoader.findClass(libgcj.so.90)
  at java.lang.ClassLoader.loadClass(libgcj.so.90)
  at java.lang.ClassLoader.loadClass(libgcj.so.90)
  at gnu.java.lang.MainThread.run(libgcj.so.90)

 then uninstalled eclipse and tried to install20it again and the install failed
nd I cannot uninstall e...

Read more...

Revision history for this message
Niels Thykier (niels-thykier) wrote :

Eme wrote:
> When I compile I added the .jar path by the comand:
>=20
>=20
> javac -classpath <path to .jar> LPex1.java
>=20
>=20
> this command works with no errors, but when I write the following
> command:
>=20
>=20
> java -Djava.library.path=3D<path_to_shared_library> LPex1
>=20
>=20
> I got the error message that I posted earlied. I think there is a
> permission problem where the library can not be accessed by the user
> account! but since I am new to the linux os I don't really know how to
> solve it!
>=20

Hi Eme

You need the same classpath when you compile and when you run it. Try

java -classpath <path to .jar>\
-Djava.library.path=3D<path_to_shared_library> LPex1

Your problem is that java cannot find your class "LPex1". When running a
java class from cmdline you have to give it the full class name
including package (e.g. my.code.LPex1 if it is in the package "my.code")
as well as making sure that the class is defined in the classpath.

I do not know how you have concluded this problem is in eclipse; but
nothing so far connects your problem with eclipse. - particularly the
paths you have shown so far suggests that it is locally installed
software and not something provided by Ubuntu.

~Niels

>=20
> -----Original Message-----
> From: Niels Thykier <email address hidden>
> To: <email address hidden>
> Sent: Fri, Oct 9, 2009 2:08 pm
> Subject: Re: [Bug 323763] Re: Eclipse did not install AppletViewer
>=20
>=20
>=20
> Eme wrote:
> Hi All,
> I am experiancing similar problem. In my case I am installing Ilo=
g ceplex=20
> nd planning to use the JAVA concert technology. so whe I compile the ja=
va file=20
> name: LPex1.java) I have no problem but when I try to run it I got the =

> ollowing message
> =20
> Hi Eme
>> eman@eman-laptop:~$ java -Djava.library.path=3D/usr/local/ilog/cplex90=
/bin/i86_linux2_glibc2.3_gcc3.2=20
> Pex1
> Exception in thread "main" java.lang.NoClassDefFoundError: LPex1
> at gnu.java.lang.MainThread.run(libgcj.so.90)
> Caused by: java.lang.ClassNotFoundException: LPex1 not found in=20
> nu.gcj.runtime.SystemClassLoader{urls=3D[file:/usr/local/ilog/cplex90/l=
ib/cplex.jar],=20
> arent=3Dgnu.gcj.runtime.ExtensionClassLoader{urls=3D[], parent=3Dnull}}=

> at java.net.URLClassLoader.findClass(libgcj.so.90)
> at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
> at java.lang.ClassLoader.loadClass(libgcj.so.90)
> at jav
> a.lang.ClassLoader.loadClass(libgcj.so.90)
> at gnu.java.lang.MainThread.run(libgcj.so.90)
> =20
> Notice that I am specifying the LD_library Path in the java command
> line!
> =20
> I was serching on the net and I found alot of similar bugs for differe=
nt
> types of lib files and one suggestion was to download the JDK od SUN
> which I wasn't sure if it would be the solution of my problem.
> =20
> Please help if you know the solution.
> =20
> Your problem is unrelated to eclipse. Your problem is probably that yo=
u
> o not add any jars or folders to your classpath. You are most likely
> issing a "-cp $jar1:$jar2:...:$jarN" in your command besides the
> Djava.library.path
>=20
> Niels

Revision history for this message
Eme (eman76) wrote :

Hi Niels, thanks for your help but I guess it doesn't work. I tried the command that you gave me and this is what I got:

eman@eman-laptop:~$ java -classpath /usr/local/ilog/cplex90/lib/cplex.jar\ -Djava.library.path=3D /usr/local/ilog/cplex90/lib/i86_linux2_glibc2.3_gcc3.2 LPex1Exception in thread "main" java.lang.NoClassDefFoundError: .usr.local.ilog.cplex90.lib.i86_linux2_glibc2.3_gcc3.2
   at gnu.java.lang.MainThread.run(libgcj.so.90)
Caused by: java.lang.ClassNotFoundException: .usr.local.ilog.cplex90.lib.i86_linux2_glibc2.3_gcc3.2 not found in gnu.gcj.runtime.SystemClassLoader{urls=[], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.90)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
   at java.lang.ClassLoader.loadClass(libgcj.so.90)
   at java.lang.ClassLoader.loadClass(libgcj.so.90)
   at gnu.java.lang.MainThread.run(libgcj.so.90)

I think I am missing up things so I will give you what I have done:

The LPex1.java under my home directory

the ilog folder is under the /usr/local folder which has the .jar file in the library at the mintioned path

they are in different directories so if I want to run the LPex1 should I save it under the /usr/local directory!

the following was the way that I got from the ilogcplex tutorial to run java:

eman@eman-laptop:~$ javac -classpath /usr/local/ilog/cplex90/lib/cplex.jar LPex1.java
eman@eman-laptop:~$ java -Djava.library.path=/usr/local/ilog/cplex90/bin/i86_linux2_glibc2.3_gcc3.2 LPex1Exception in thread "main" java.lang.NoClassDefFoundError: LPex1
   at gnu.java.lang.MainThread.run(libgcj.so.90)
Caused by: java.lang.ClassNotFoundException: LPex1 not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/ilog/cplex90/lib/cplex.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.90)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
   at java.lang.ClassLoader.loadClass(libgcj.so.90)
   at java.lang.ClassLoader.loadClass(libgcj.so.90)
   at gnu.java.lang.MainThread.run(libgcj.so.90)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.