[Bug 323763] Re: Eclipse did not install AppletViewer

Niels Thykier niels at thykier.net
Sun Oct 11 16:07:09 UTC 2009


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 <niels at thykier.net>
> To: eman76 at mail.com
> 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 at 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

-- 
Eclipse did not install AppletViewer
https://bugs.launchpad.net/bugs/323763
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list