LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Errors when starting Java app on Fedora Core 3 (http://www.linuxquestions.org/questions/linux-software-2/errors-when-starting-java-app-on-fedora-core-3-a-457018/)

sxa 06-21-2006 02:56 PM

Errors when starting Java app on Fedora Core 3
 
I haven't been here begging for help in a long time, but I am very much puzzled. I have a program called jlog that I am attempting to run in Java. While I don't suppose anyone has used this program, perhaps you might be kind of enough to help with the error I am getting when I try to start the application.

First off, I believe the issue may be related with the version of Java I am running (I have the Red Hat Java, not Sun's java.. however, in installed Sun's java.. the main java is still Red Hat Java.. I guess the easiest thing would be to remove it, but I don't know how.. it it not listed under add/remove programs)


Code:

[steve@localhost ~]$ java -version
java version "1.4.2"
gij (GNU libgcj) version 4.0.2 20051125 (Red Hat 4.0.2-8)

Copyright (C) 2005 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.
[steve@localhost ~]$

Here is the output when I try to start the program. The program worked fine on slackware with Java 2 (1.4.2). So I assume the issue is with Java, but perhaps someone else has another guess.

Code:

[steve@localhost jlog]$ sh jl.sh

(.:5853): GLib-GObject-WARNING **: invalid uninstantiatable type `gint' in cast to `GtkWidget'

(.:5853): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed

(.:5853): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkWidget'

(.:5853): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed
no contest specified: contests/uninitializedValue.props

Thanks for any help!

reddazz 06-21-2006 03:14 PM

GCJ java is awful and many apps just won't work with it. I have had similar errors with limewire and azureus. I would suggest that you either remove it or rename the java executable to something else, so that when the system searches for java it uses Suns java.

sxa 06-21-2006 05:04 PM

removing it doesn't seem to want to work "yum remove java" comes back saying there is nothing selected for removal.

When I set the path to Sun Java:

"/home/steve/j2re1.4.2_11/bin/java -cp ./bin:$/home/steve/j2re1.4._11/lib/comm.jar com.loukides.jl.jl.JL $1 $2"

it comes back with:

Code:

[steve@localhost jlog]$ ./jl.sh
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/steve/j2re1.4.2_11/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.security.action.LoadLibraryAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
        at sun.awt.DebugHelper.<clinit>(Unknown Source)
        at java.awt.Component.<clinit>(Unknown Source)
        at com.loukides.jl.jl.JL.<clinit>(Unknown Source)

I know that is the path to java because when I cd into that directory I get
Code:

./java -version
java version "1.4.2_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)
Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)

That is bizzare.

reddazz 06-21-2006 05:16 PM

The package should be called libgcj. If you have java-{someversion}-compat, then uninstall that as well. If you have dependency problems, you can simpy delete the /usr/bin/java symlink if you have put Sun java in your path, log out and in again and Sun java should be the default java.

sxa 06-21-2006 06:15 PM

I have removed the other java.. now apparently I am missing something, and I am not sure what.. LibXp.so.6 comes with the xorg-X11-libs which my computer tells me I have the latest version.

Code:

[steve@localhost jlog]$ sh ./jl.sh
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/steve/j2re1.4.2_12/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.security.action.LoadLibraryAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
        at sun.awt.DebugHelper.<clinit>(Unknown Source)
        at java.awt.Component.<clinit>(Unknown Source)
        at com.loukides.jl.jl.JL.<clinit>(Unknown Source)


THANK YOU FOR YOUR HELP SO FAR!!

reddazz 06-21-2006 06:32 PM

After a couple of minutes googling, I found out that you have to install xorg-x11-deprecated-libs.

sxa 06-21-2006 06:38 PM

I have no clue why I didn't google it.. THANKS!! Program works fine now..

Off to configure everything!

THANKS AGAIN!!!!

:D :D :D :D :D


All times are GMT -5. The time now is 07:47 PM.