All files are in the E: path.
Install jdk1.6.0_07
VC++6.0 installed
first step,
HelloWorld.java
The second step,
E:>javac HelloWorld.java
get
HelloWorld.class
The third step,
E:>javah HelloWorld
get
HelloWorld.h
The fourth step,
Write a C file
HelloWorldImp.c
The fifth step,
Use cl to compile step 6,
I succeeded
Later, I continued to experiment, and the goal was for Java to call the printer's tsclib.dll. The method was for the dll to call the dll: create an intermediate dll, take into account the Jni method, and call tsclib.dll to implement the action. (Tell you the result in advance: I failed)
------------------------The source code is below:
This article comes from the CSDN blog. Please indicate the source when reprinting: http://blog.csdn.net/pinkPumpkins/archive/2009/12/18/5029199.aspx
-