×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

Thanks Rosella. More questions, pls help!

I have the .java source code. My target is to change the .java file to dll file and then from Labview library note to call the dll. I was blocked on how to change.java file to dll. I do not familiar with Java,so would you pls explain in detail, I would appreciated for your kindly help!This is information I got from National Instrument for the suggestion:
====================
In order to use the call library node function from LabVIEW, you will need
to have a 32 bit windows dll with a C style interface already created. For
your case, it may be necessary to create a C wrapper around the .java file
using the Java Native Interface (JNI). I found this knowledgebase article
which describes how to do this:
http://digital.ni.com/public.nsf/websearch/BEE812007BA2A9B486256BC80068A49A?OpenDocument
===================
The above link did not tell in detail of how to do .java to dll .
Report

Replies, comments and Discussions:

  • 工作学习 / 专业技术讨论 / 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
    • 用C编译器生成dll,用JNI调用就得了,免费的,具体操作网上自己查吧,多的是。
      • Thanks 南瓜饼, You mean use C complie .java source code, how to do it? Pls describer in detail! Thanks a lot
    • 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
      • Thanks Rosella. More questions, pls help!
        I have the .java source code. My target is to change the .java file to dll file and then from Labview library note to call the dll. I was blocked on how to change.java file to dll. I do not familiar with Java,so would you pls explain in detail, I would appreciated for your kindly help!This is information I got from National Instrument for the suggestion:
        ====================
        In order to use the call library node function from LabVIEW, you will need
        to have a 32 bit windows dll with a C style interface already created. For
        your case, it may be necessary to create a C wrapper around the .java file
        using the Java Native Interface (JNI). I found this knowledgebase article
        which describes how to do this:
        http://digital.ni.com/public.nsf/websearch/BEE812007BA2A9B486256BC80068A49A?OpenDocument
        ===================
        The above link did not tell in detail of how to do .java to dll .
      • 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.
      • 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
        • 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 :-)