Forums › English Language Forums › Technical › Technical Issues

Search

Linux libjawt.so error and how I fixed it

2 replies [Last post]
Mon, 04/23/2012 - 21:24
Telerith

I'm using Ubuntu 10.04 32-bit with Oracle Java 7u3.

Whenever I would try to run Spiral Knights, the initial launcher / patcher would run, but the game itself wouldn't. Upon checking the error log, I was receiving this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/my home/programs/spiral/native/liblwjgl.so: libjawt.so: cannot open shared object file: No such file or directory

I've heard this may be a bug with this version of Java, and Java 6 may work better. Nevertheless, the fix to play the game with this version of Java isn't too difficult, as long as you know where on your system Java is installed, and you don't mind using the command line a little bit.

The first step is to locate the libjawt.so file on your computer. You can use whatever file search feature you're comfortable with. One way to do this from the command line is to switch to your root directory ( / ) and run this command:

find . | grep "libjawt.so"

Most desktops, such as Gnome / Unity / KDE, have search features built-in, and you can use those if you like.

I install my Java into /usr/java, so my libjawt.so file can be found here:

/usr/java/jdk1.7.0_03/jre/lib/i386

Exactly where it can be found on your system depends on where Java was installed. This is what you use your search feature to find out.

One you've located the directory your libjawt.so file is in, go into your spiral directory and edit the spiral file using your favorite text editor. Directly underneath the line that reads:

# run the updater/launcher

Add the following text:

export LD_LIBRARY_PATH=path to your libjawt.so directory:$LD_LIBRARY_PATH

For instance, for me the line looks like:

export LD_LIBRARY_PATH=/usr/java/jdk1.7.0_03/jre/lib/i386:$LD_LIBRARY_PATH

Which makes the entire bottom part of the spiral file look like this:

# run the updater/launcher
export LD_LIBRARY_PATH=/usr/java/jdk1.7.0_03/jre/lib/i386:$LD_LIBRARY_PATH
$JAVA $* -jar $INSTDIR/getdown-pro.jar $INSTDIR

Again, in your own file you'll want to use the path to the libjawt.so file on your computer, as your path will probably be different than mine.

Once you've edited the file, save it, and Spiral Knights should now work fine.

Tue, 04/24/2012 - 06:48
#1
Alienf
isn't 2 hard

i use mac though, only use linux for a month, gave up on it due to the [crappy] p.c i put it on.

though do u know what this means

Last login: Tue Apr 24 08:47:58 on ttys000
/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java ; exit;
studentimage:~ Username$ /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java ; exit;
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available (implies -server, only for x86_64)
-client to select the "client" VM
-server to select the "server" VM
-jvm is a synonym for the "client" VM [deprecated]
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.

-cp
-classpath
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D=
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:...|:]
-enableassertions[:...|:]
enable assertions
-da[:...|:]
-disableassertions[:...|:]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:[=]
load native agent library , e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:[=]
load native agent library by full pathname
-javaagent:[=]
load Java programming language agent, see java.lang.instrument
-splash:
show splash screen with specified image

Tue, 04/24/2012 - 06:51
#2
Alienf
wait....

i think java gave me a list of its commands... lolz.. i understand now..

double post :)

Powered by Drupal, an open source content management system