Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JAR issue 1

Status
Not open for further replies.

JavaDude32

Programmer
Aug 25, 2001
180
0
0
US
Hello, I seem to have a complex problem, did a google search, didn't find too much.

I'm trying to make a Jar file like so:

jar cv0 ZipFlex.jar *

I've also tried

jar -cv0 ZipFlex.jar *

and

jar -cv0 ZipFlex.jar *.class

This is entered into a terminal (Gnome and Xterm) on Debian with the BASH shell with the Sun Java JDK 1.4.2 with enivornment variables set like:
Code:
PATH=/home/username/j2sdk_nb/j2sdk1.4.2/bin:/home/username/j2sdk_nb/j2sdk1.4.2/lib:$PATH

CLASSPATH=/home/username/j2sdk_nb/j2sdk1.4.2/bin:/home/username/j2sdk_nb/j2sdk1.4.2/lib:/home/username/Coding/...(etc)

Issue is whenever I execute the above jar commands, a whole lotta gibberish is printed to the screen and I can't find the jar file anywhere.
I'm wondering if this is due to the fact I installed the Sun SDK on Debian instead of redhat (from binary)? Thing though is that java and javac work fine. Although I didn't have the classpath variable set until after encountering a problem with jar (java and javac worked for compilation and testing).

Any ideas please??
 
Extra note, I noticed I didn't have the code set up into packages but that shouldn't cause the output I saw should it?
 
You want :

jar cvf ZipFlex.jar *

Using the parameters "cv0" means "create (c), verbose(v), and do not use sip compression (0)". You get everything to the screen becasue you have not specified a filename (f) - so it dumps the jar file to stdout.
 
Yeah I noticed that later, aye stupid mistakes. *shrugs* Thanks though :). I'll give you a star as I could see others getting confused by the same.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top