Raffiudeen Illahideen wrote:
> Hello All;
> I have downloaded the jswdk1.0 today, and I was testing some existed
java
> files, named Cookie.java. I have downloaded the jswdk in the following
> directory in my hard drive
>
> C:\unzipped\jswdk1_0-win\jswdk-1.0\src\javax\servlet
> ==the Cookie.java is in the http folder which is under the servlet folder.
> When I compile through JDK1.2 via DOS I got the following errors after
> successful compilation.
>
> ERROR MESSAGE:
>
> C:\unzipped\jswdk1_0-win\jswdk-1.0\src\javax\servlet\http>javac
Cookie.java
>
> C:\unzipped\jswdk1_0-win\jswdk-1.0\src\javax\servlet\http>java Cookie.java
> Exception in thread "main" java.lang.NoClassDefFoundError: Cookie/java
>
> C:\unzipped\jswdk1_0-win\jswdk-1.0\src\javax\servlet\http>
>
> ===========PLEASE HELP ME IF I AM DOING SOMETHING WRONG! THANKS
You have issued two commands:
1. C:\unzipped\jswdk1_0-win\jswdk-1.0\src\javax\servlet\http>javac
Cookie.java
Right. It compiles your source code and generates a compiled
Cookie.class file.
2. C:\unzipped\jswdk1_0-win\jswdk-1.0\src\javax\servlet\http>java
Cookie.java
Wrong. The java command can execute compiled java files with "class"
extension.
You should have written "java Cookie" to execute the program after
compilation.
Notice that you should have a main method in the java class to run an
application. Cookie.java source is not an example from the Java servlet
package (it's not an application).
Regards,
Fernando Cuezva
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html