Error running java client generated by Developer on Unix

I’ve generated a java client of a standard flow service (wM 6.1). I compiled the java file in my Unix env (javac encrypt.java) and it resulted in a encrypt class.
However when I run the java program I have the following java exception:

Exception in thread “main” java.lang.NoClassDefFoundError: encrypt

I do not understand why it does not work.

I have le …/lib/client.jar in my CLASSPATH.

Has anyone achieve to run a java client generated by wM on Unix?
I may have some problems with my unix profile.

Thanks for your help.

Sounds like you may have a classpath issue. Many of the j2ee containers contain java crypto classes which may load prior to the client.jar. We had a similar issue and to get around the problem we extracted the entrust directory from the client.jar to the same directory we were having our j2ee container load the client.jar this allowed the client.jar to find the specific classes it needed.

Good Luck.

-Liam

It looks like the compile encrypt.java, encrypt.class, is not on the classpath of the client. You will need both client.jar and encrypt.class on your classpath.

Also, check if encrypt.java has a Java package element. If so, you will need to include that when launching the compiled class. For instance, if the Java package is utils.encryption and the compiled class file is in a classes subtree, the launch command line would look like:

java -classpath ./client.jar;./classes/utils/encryption utils.encryption.encrypt

HTH,
Fred