Problem with java under linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stefano Bianchi

    Problem with java under linux

    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:Fi ller.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.NoCla ssDefFoundError : EPT.jar
    at 0x40267aab: java.lang.Throw able.Throwable( java.lang.Strin g)
    (/usr/lib/./libgcj.so.3)
    at 0x40259640: java.lang.Error .Error(java.lan g.String)
    (/usr/lib/./libgcj.so.3)
    at 0x4025b440: java.lang.Linka geError.Linkage Error(java.lang .String)
    (/usr/lib/./libgcj.so.3)
    at 0x4025cad0: java.lang.NoCla ssDefFoundError .NoClassDefFoun dError(java.lan g.String)
    (/usr/lib/./libgcj.so.3)
    at 0x402b184f: gnu.gcj.runtime .FirstThread.ru n()
    (/usr/lib/./libgcj.so.3)
    at 0x4024cfbc: _Jv_ThreadRun(j ava.lang.Thread )
    (/usr/lib/./libgcj.so.3)
    at 0x40219cdc: _Jv_RunMain(jav a.lang.Class, byte const, int, byte
    const, boolean) (/usr/lib/./libgcj.so.3)
    at 0x08048920: ?? (??:0)
    at 0x406ad7f7: __libc_start_ma in (/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
  • Brad BARCLAY

    #2
    Re: Problem with java under linux

    Stefano Bianchi wrote:
    [color=blue]
    > 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?[/color]

    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
    

    Comment

    • Stefano Bianchi

      #3
      Re: Problem with java under linux

      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

      Comment

      Working...