| Author |
help in javah
|
Vishal Gautam
Greenhorn
Joined: Dec 18, 2004
Posts: 1
|
|
Hi I am a newbee to java and jni I have following code package com.vishal.practice; import java.io.PrintWriter; public class NativeDemo { int i; public static void main(String[] args) { NativeDemo ob = new NativeDemo(); ob.i = 10; PrintWriter pw = new PrintWriter(System.out); pw.write("Before: " + ob.i); ob.test(); pw.write("After: " + ob.i); } public native void test(); static { System.loadLibrary("NativeDemo"); } } I have compiled the code to build .class file when I try to execute the following command javah -jni com.vishal.practice NativeDemo I get the following error Error: Class com.vishal.practice.NativeDemo could not be found. Not Sure what the reason is. Please Help Regards Vishal
|
~Vishal
|
 |
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
|
|
[b]I am a newbee to java and jni</b> I think that jni is not a beginner topic. However, I wonder if your problem is in the way you are using the command rather than with your code. What if you put a dot before NativeDemo? Like this: javah -jni com.vishal.practice.NativeDemo
|
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
|
 |
 |
|
|
subject: help in javah
|
|
|