>>>>> Nathan Meyers writes:

    >> I have been trying how I can use JNI from within a servlet. I
    >> have tried the code that comes with Apache-jserv. Servlets
    >> compile and run without any problem. The problem is with javah.
    >> After a successful compilation (i hope) when I try to make a C
    >> header file, it gives the error below.

    Nathan> Just to be sure... you didn't leave out any details here:

Yep, the code shows a strange '$'.

    >> The error output:
    >> [root@svrlinux1 muha]# javac SimpleServlet.java(no problem here)
    >> [root@svrlinux1 muha]# javah -jni SimpleServlet
    >> Signalled error "java/lang/NoClassDefFoundError" with detail
    >> "javax/servlet/http/HttpServlet"
    >> SimpleServlet: no such class

    Nathan> ? Servlets come from an extension library, and you had
    Nathan> that library in the classpath for both javac and javah?

This is a known bug in javah from JDK 1.1.  See bug 1226 in our
database or bug 4062829 on the JDC.  The problem is that javah doesn't
work with zip/jar-files.  The workaround is too extract jsdk.jar.


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Porting Team
http://www.blackdown.org/java-linux.html


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to