how cat i run jar from sh


 
Thread Tools Search this Thread
# 8  
Replace the ';' in '-cp' with ':'. The Java class path separator on Unix is a colon.
# 9  
thanks
but now i have this error when i do :
java -cp .:./foo.jar com.umen.Main

java.lang.NoClassDefFoundError: com/umen/Main
Exception in thread "main"

why ?
by the way this working great in windows and cmd
# 10  
ok and another thing is im running under cygwin ..
# 11  
Quote:
Originally Posted by umen
ok and another thing is im running under cygwin ..
The cygwin environment is supposed to act like Unix, so you should not use ';' to separate class path because ';' is a statement separator in bash (and many other shells).

The NoClassDefFoundError exception means that it cannot find the com.umen.Main class. Your classpath says to find in the current directory and foo.jar for classes. Make sure you have a com/umen/Main.class at these locations. Watch out as Java is case sensitive so com/umen/main.class cannot be used to satisfy com/umen/Main.class even though Windows normally consider them the same.
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #785
Difficulty: Medium
The TRS-80 Model 100 was a desktop-style computer introduced in 1983.
True or False?

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell file to run other shell files running jar files

Hi, I am trying to write a shell script that will go to another folder and run the script in that folder. The folder structure is kind of like this: /MainFolder/ |-> MainShellScript.sh | |-> Folder1/ |-----|-> script1.sh |-----|-> FileToRun1.jar | |-> Folder2/ |-----|-> script2.sh... (3 Replies)
Discussion started by: sleo
3 Replies

2. Shell Programming and Scripting

Want to write all the jar name in single with delimiter ":" in beween the jar name

Hi All, I am having 7 jar files in a dir. abc like listed below bash-3.00$ cd abc bash-3.00$ ls 123.jar 23wdawd.jar dfsa23.jar dsa.jar wew234.jar adsd234234.jar dfsda423.jarNow i want to assign all this jar files to a variable in the below format ... (6 Replies)
Discussion started by: natraj005
6 Replies

3. Shell Programming and Scripting

jar options..Help..

Hi, Is there an option with jar command which allows us to copy some class files(already existing,want to override)to a jar file without exploding it.? Thanks in advance. (1 Reply)
Discussion started by: dnam9917
1 Replies

4. UNIX for Dummies Questions & Answers

down in JAR file

Hello sir, I have created a jar file having some code in java.What it does is that it calls a shell code (a.sh) which is in the same directory. Now my requirement is that I want to jar the a.sh also along with the other files and want to call the a.sh which is now inside the jar file and not... (1 Reply)
Discussion started by: nsharath
1 Replies

5. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

6. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

7. UNIX for Dummies Questions & Answers

Jar patches

Hi, This is definitely a dummy question, so I guess I'm in the right place. I've got to install some solaris patches. I've downloaded the correct patches as .jar files and also as .zip files. How do I extract these so that I can then use the patchadd command. I've created a... (0 Replies)
Discussion started by: thewetch
0 Replies

8. Solaris

Jar and tar

I am a beginner to Solaris In Solaris you will find 'jar'. I am used to 'tar' command in Linux. What makes the differenced between 'jar' and 'tar' ? Is 'jar' unique to Solaris? I found a command called 'compress' too in Solaris. It is not in my Linux. Is it something special to... (1 Reply)
Discussion started by: Angelo
1 Replies

Featured Tech Videos