Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Linux Support (https://www.gnutellaforums.com/general-linux-support/)
-   -   Exception in thread "main" java.util.zip.ZipException (https://www.gnutellaforums.com/general-linux-support/7706-exception-thread-main-java-util-zip-zipexception.html)

Unregistered January 30th, 2002 09:00 AM

Exception in thread "main" java.util.zip.ZipException
 
First, I will describe the problem. I have successfully installed LimeWire and have run it once. The second time, and all subsequent times I tried running it, I get an exception in a thread. As instructed, I set the J2SE_PREEMPTCLOSE=1 flag by placing it in the "runLime.sh" script. I also had to add "ulimit -s 2048" due to a stack restriction conflict. Second, I will divulge the versions of software I am using. I have LimeWire 2.1.3, glibc 2.2.1, Sun's jre 1.3.1_02, and bash 2.05. Java is correctly in my path, and for integrity's sake, I reinstalled it fresh. I did the same for LimeWire. As for permissions, I installed LimeWire as root, and ran it as a user. After I got this error, I tried it as root to no avail. As for the zip part, I have Adler, Wales and Gailly Zip 2.2 installed. No, I do not have Kaffe; I know this because I personally built my system from scratch (LFS). The explicit error message reported from the console is below:

Pluto:/home/greg $ /opt/LimeWire-2.1.3/runLime.sh
Exception in thread "main" java.util.zip.ZipException: No such file or directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:110)
at java.util.jar.JarFile.<init>(JarFile.java:115)
at java.util.jar.JarFile.<init>(JarFile.java:57)
Pluto:/home/greg $

Thanks,
Greg

Unregistered January 30th, 2002 03:33 PM

cd to the limewire dir first and then start the runlime.sh. Or write a cd /usr/local/limewire in the runlime.sh file.
Worked for me

yourfriendgregd January 30th, 2002 05:30 PM

That did it.

However, that works if I am in a terminal. It does not work if I try to make a desktop link (in KDE) and try to run it, even if I put "cd /LimeWireDir" in the run script.

Thanks,
Greg

HeadHolio January 31st, 2002 06:56 AM

Here's how I got my desktop link to work. I edited the runlime.sh file so that it looked something like the following.

#!/bin/bash
cd /home/home/LimeWire
J2SE_PREEMPTCLOSE=1; export J2SE_PREEMPTCLOSE
java -jar RunLime.jar

(of course, your LimeWire installation will probably be in a different directory)

After this change, making a link to this file should work.

yourfriendgregd January 31st, 2002 09:28 AM

The desktop link still doesn't work. It looks like it all should. Below is the contents of my script verbatim. The ulimit is a fix for glibc 2.2 compatibility (so I am told). Below the script is the contents of the desktop link. I have it set to "run in a terminal" mode.

Greg


// begin runLime.sh
#!/bin/bash

# fixes for compatibility sake
ulimit -s 2048
cd /opt/LimeWire-2.1.3
J2SE_PREEMPTCLOSE=1
export J2SE_PREEMPTCLOSE

# original script
CLASSPATH=".:collections.jar:xerces.jar:jl011.jar"
export CLASSPATH
java -jar RunLime.jar
// end runLime.sh

// begin limewire.desktop
[Desktop Entry]
Comment=
Exec=/opt/LimeWire-2.1.3/runLime.sh
Icon=/opt/kde/share/icons/hicolor/32x32/apps/lime.png
Name=LimeWire
Path=/opt/LimeWire-2.1.3/
Terminal=1
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
// end limewire.desktop

HeadHolio January 31st, 2002 11:39 AM

I'm not sure if this is a fix or not, but I always had problems running scripts in KDE which had blank lines in them. I now have a habit of deleting any blank lines and comments from all scripts. You might want to try it.

yourfriendgregd January 31st, 2002 12:32 PM

That didn't work. The konsole comes up and disappears in a flash, so I think this has to do with working directories. However, I don't know how to make Konsole not exit so that I may see what error messages are coming up. If I run the script from any other directory as any other user from the command line, everything works fine.

Oh well,
Greg

Unregistered February 3rd, 2002 05:11 PM

Hope this helps:
 
Hi,

1) You might want to try hard-wiring the CLASSPATH in your runLime.sh, like so:

CLASSPATH="/your/limewire/directory:/your/limewire/directory/collections.jar"
... and so on for the rest of the jar files.

2) Here's a generic runLime.sh that starts up in the correct directory every time, for any user, so you don't have to change it if you move the LimeWire directory...

#!/bin/sh

WD=`dirname $0`
cd $WD
CLASSPATH=".:collections.jar:xerces.jar:jl011.jar"
export CLASSPATH
java -jar RunLime.jar

Hope this helps.

-J.


All times are GMT -7. The time now is 05:57 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.