By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,034 Members | 820 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,034 IT Pros & Developers. It's quick & easy.

Problem with java under linux

P: n/a
Ciao,

I need to start a java form compiler from linux.
The script that comes with the program simply says (after some
checks):

java -classpath Packager.jar:Filler.jar -jar EPT.jar

However, if I run it, I get:

java version "1.2"
gij (GNU libgcj) version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)

Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Warning: -jar not understood. Ignoring.
Exception in thread "main" java.lang.NoClassDefFoundError: EPT.jar
at 0x40267aab: java.lang.Throwable.Throwable(java.lang.String)
(/usr/lib/./libgcj.so.3)
at 0x40259640: java.lang.Error.Error(java.lang.String)
(/usr/lib/./libgcj.so.3)
at 0x4025b440: java.lang.LinkageError.LinkageError(java.lang.Stri ng)
(/usr/lib/./libgcj.so.3)
at 0x4025cad0: java.lang.NoClassDefFoundError.NoClassDefFoundErro r(java.lang.String)
(/usr/lib/./libgcj.so.3)
at 0x402b184f: gnu.gcj.runtime.FirstThread.run()
(/usr/lib/./libgcj.so.3)
at 0x4024cfbc: _Jv_ThreadRun(java.lang.Thread)
(/usr/lib/./libgcj.so.3)
at 0x40219cdc: _Jv_RunMain(java.lang.Class, byte const, int, byte
const, boolean) (/usr/lib/./libgcj.so.3)
at 0x08048920: ?? (??:0)
at 0x406ad7f7: __libc_start_main (/lib/i686/libc.so.6)
at 0x080486c1: ?? (??:0)

I guess that the error is in the fact that the command is ignoring the
-jar option, so that the EPT.jar is not read.
Java version and linux system are written on the log. How should I
translate the command line to get it working?

Thanks,

Stefano
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Stefano Bianchi wrote:
I guess that the error is in the fact that the command is ignoring the
-jar option, so that the EPT.jar is not read.
Java version and linux system are written on the log. How should I
translate the command line to get it working?


Do you have any special reason for using GCJ? I'd strongly suggest
going and downloading Sun's JDK v1.4.2 for Linux if you don't.

If you do have Sun's Java installed, check your PATH statement, and
ensure that the path to Sun's Java appears before the GCJ Java Runtime
(use "which java" to find out).

HTH!

Brad BARCLAY

--
=-=-=-=-=-=-=-=-=
From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project: http://www.jsyncmanager.org

Jul 17 '05 #2

P: n/a
Thank you Brad!

I had Sun java installed, but it was not in my path.
I simply changed the script to run the Sun java bin instead of gjc and it works!
Maybe I should replace Sun java to gjc as a default...

Stefano
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.