Question about JNI

Homer

Adept
I'm trying to do a basic JNI program for "HelloWorld ".Heres where i get stuck;

I've come upto the step where you have to create the DLL after compiling the HelloWorld.c file. I'm using MS VC++.Now the DLL builds fine without errors,however in the "GUIDE" at section "2.6 Compile the C Source and Create a Native Library", how and where am I supposed to do these steps (cl -Ic:\java\include -Ic:\java\include\win32
-MD -LD HelloWorld.c -FeHelloWorld.dll )
This is the only reason i'm getting errors while running the code.

Please help guys:huh: :huh:
 
Ahhh.....brings back memories from the old times. I dont have a VC compiler setup at the moment , but pretty sure its build DLL from the menu.

Hope it helps.
 
Very simple: If you use any of the VS.NET studio products (2003, 2005, express), just go to the program menu, go to Visual Studio Command Prompt and issue that command.

Alternately, if the necessary environment settings are present (test by opening a normal command prompt and entering cl. If it says "cl is not recognized as a valid ..." then the necessary variables are not setup), then you can enter this command at any command line.
 
Back
Top