I have located the com.ab folder to be in the
following folder:
C:\SWRoot\src
I have added the C:\SWRoot\src to my environment
variables (I am using windows xp control panel -->
system properties to do that)
Hmm... Adding the source directory to the classpath will not help. It is source code after all and has not been compiled itself.
I have also added the rest of the jar files as
instructed by the vendor to my environment
variables.
That's more like it. I would expect these classes to exist in a jar file.
But When I try java Tutorial01 , I get error :
Exception in thread "main"
java.lang.NoClassDefFoundError
Be sure that when you run the java command you specify the fully qualified name of the class you are attempting to run. This includes the packages if any.
You are having very common and very basic problems beginning. I would suggest you find someone who knows how to program in Java to tutor you at least on compilation and execution. And, at the very least, go through the "Getting Started" tutorial
I agree with the previous poster. It would help you to review the tutorial and seek out additional help with the basics.
In the meantime..... Use a destination directory when you compile classes that exist in another package besides the default package. So first create a directory for the destination code called "classes" in your working directory, where Tutorial01.java exists. Then you can specify this destination directory using the 'd' option with the javac command.
javac -d classes Tutorial01.java
Notice that the compiler generates a directory structure which mirrors the package structure of the class being compiled. Then include the directory classes on the classpath, preferably using the 'classpath' option, but you can also do this by setting the System properties environment variable. Note that using the classpath option with the java command will override any system wide values you have set for the classpath. So you will need to include the path to the jar files in addition to the classes directory.
More information about using options with the javac command can be found here..
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html#options