This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / Ugent! Java JNI , 各位JAVA 高手, pls help!I have one problem urgently! I need to have a 32 bit windows dll with a C style interface created. how can I create a C wrapper around the .java file using the Java Native Interface (JNI)? Is it free to use JNI?
I am not familiar with Java, I would be appreciated if anyone can help. This is very urgent.
Thanks in advance
-jj0829(jj);
2006-11-30
{327}
(#3351875@0)
-
用C编译器生成dll,用JNI调用就得了,免费的,具体操作网上自己查吧,多的是。
-pumpkinpie(南瓜饼);
2006-11-30
(#3352040@0)
-
Thanks 南瓜饼, You mean use C complie .java source code, how to do it? Pls describer in detail! Thanks a lot
-jj0829(jj);
2006-11-30
(#3352252@0)
-
If you already have the java file, run javah against the compiled class. This creates a C header file xx.h , include this header xx.h in your c program ...google it and you will find lots of example: http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html
-rosella(rosa);
2006-11-30
{101}
(#3352064@0)
-
Thanks Rosella. More questions, pls help!
-jj0829(jj);
2006-11-30
{893}
(#3352242@0)
-
I still need kindly help. I can not understand Java. My project deadline is coming and this is the only thing I can not figure out.
-jj0829(jj);
2006-12-1
(#3353723@0)
-
I just got one article from website.Would you pls kindly tell me if I can follow it because our IT said they did not know it. If it is ok, I will ask IT again for the help. I hope it is work.
http://72.14.205.104/search?q=cache:QPK9RC_GXSgJ:bdn.borland.com/article/20679+c+compile+Java+to+dll&hl=en&gl=ca&ct=clnk&cd=4
Thanks in advance
-jj0829(jj);
2006-12-1
{302}
(#3353962@0)
-
well, not sure what you really want , java call c via JNI or the reverse ? If your company has IT department, tell them it's their job :-)
-rosella(rosa);
2006-12-1
(#3354150@0)