I had similar problems when trying to interface a JNI program from a
servlet. I don't remember exactly what I did, but if you are using
Windows, do this:
1) Make sure you have servletrunner running. Configure the servlet
directory parameter to where you have your servlets. Configure the
servlet properties parameter to a non-existent file. I don't know why
I had to do this, but I remember it was necessary!
2) Configure your "classpath" environment variable (%classpath%) to
a single directory, where you have your HelloWorld.class file.
If you don't have separate servlet and HelloWorld.class files, ignore
step 2.
If this doesn't work, reply to me (in either of the addresses below)
with more specific diagnostics on what your system is configured to,
and what error messages you get.
| | |\ Work address: [EMAIL PROTECTED]
| | |/ -------------------------------------
_/oona | | alaste Study address: [EMAIL PROTECTED]
On Wed, 18 Aug 1999, Anukool Lakhina wrote:
> Hello,
>
> I'm using JDK1.2.2 and JSDK2.1. So far, javac works great and compiles
> beautifully. But when I try and do java <ClassName>, I get the following
> error:
> "Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld"
>
> I thought it was a bug in my servlet code, but then I noticed it happens
> even on the trivial HelloWorld example. Even the demo applets that come
> with jdk1.2.2, don't run when invoked with java <APPLETNAME> (they compile
> ok). Funny thing is that when I run the applets using MS jview
> (C:\winnt\jview <APPLET_CLASS_NAME>), the applets run ok.
>
> Please help me so that I can go back to working on servlets without having
> to worry about issues like this. (Oh and I'm using a dual processor machine,
> NT box. Shouldn't change anything but perhaps this is causing the
> headaches?)
>
> Thanks!
>
>
> anukool.
>
> ___________________________________________________________________________
> 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
>
___________________________________________________________________________
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