[jcifs] NoClassDefFoundError Exception
Michael B Allen
mba2000 at ioplex.com
Sun Oct 19 03:41:44 EST 2003
> hello all,
> I am new to jcifs and I am tring to create a new SmbFile with:
> SmbFile aFile = new SmbFile( theSmb );
> Everything compiles fine, however when I run the code it returns a
> NoClassDefFoundError Exception.
When you run the 'java' command you will need to provide a 'classpath'. On
UNIX you can just set the environment variable 'CLASSPATH' like:
$ export CLASSPATH=path/to/jcifs-0.7.14.jar:.
$ javac MyProgram.java
$ java MyProgram
There is a description of this in the README.txt file that comes with the
jCIFS distribution package.
This is no different from any other Java application BTW.
A program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes the potential for it to be applied to tasks that are
conceptually similar and, more important, to tasks that have not
yet been conceived.
More information about the jcifs