I'm having a very unusual problem. I have a
java class that does operations on a database. I've made a Windows batch file that successfully runs this java class. Unfortunately, I can't get it to run off a unix shell. I can run a HelloWorld program using a hello.sh no problem.
From the command prompt, I ran:
java -cp hsql.jar:. DropTables
and it worked.
I then created a shell script DropDB.sh with these contents:
java -cp hsql.jar:. DropTables
Running DropDB.sh, I got the following error:
Exception in
thread "main" java.lang.NoClassDefFoundError: DropTables
What am I doing wrong? I tried putting in the absolute path instead of the dot, and it still didn't work.