3 Replies Latest reply on Oct 4, 2011 2:05 AM by EJP

    encounter error while executing "javah -jni HelloWorld.class"

    838975
      base on http://java.sun.com/docs/books/jni/html/start.html#1309, "HelloWorld.h" should be generated, but i get the error below:


      >
      C:\Program Files\Java\jdk1.7.0\bin>javac D:\java\HelloWorld.java

      C:\Program Files\Java\jdk1.7.0\bin>javah -jni D:\java\HelloWorld.class
      Exception in thread "main" java.lang.IllegalArgumentException: Not a valid class
      name: D:\java\HelloWorld.class
      at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:177)
      at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:68)
      at com.sun.tools.javah.JavahTask.run(JavahTask.java:509)
      at com.sun.tools.javah.JavahTask.run(JavahTask.java:335)
      at com.sun.tools.javah.Main.main(Main.java:46)

      C:\Program Files\Java\jdk1.7.0\bin>