• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

Java in Bourne Shell

I have a several scripts and a java program in a bin directory in Unix. I wrapped them with a Bourne Shell script and allow the user to call the shell from anywhere in unix.  I compiled the class for the java program in this directory.

The shell calls the program like so:

java <program> > <output>

I keep gettting an error back stating that there is a thread error and the class cannot be found.

Any help
1 Solution

Please check your CLASSPATH variable setting in your shell, if it does not please add it in your settings file.

If your setting is C SHELL  add it in the .cshrc file in your home directory.
if your setting is Bourn SHELL add it in the .profile file in your home directory.

e.g. if your classes file is in the following directory.
           HOME Directory/bin add the following line

for c-shell setenv CLASSPATH $HOME/bin

for Bounr Shell set CLASSPATH=$HOME/bin

And the you can embed your class file into any shell script.

G Ramesh


Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now