11-14-2009 06:58 PM
11-14-2009 09:18 PM
No.
You're just going to have to figure out what the Java code is doing and duplicate its functionality in LabVIEW.
02-08-2010 01:37 PM
Hello eearle,
I have the same guestion. How did you go about doing the same?
Thanks,
H.
02-08-2010 02:02 PM
You basically sit down with the Java source and draw out its functionality in whatever notage your most comfortable, flow diagrams, flow chart, whatever. Then you sit down with your LabVIEW development system and try and recreate the functionality, remembering that LabVIEW is a data flow language, but that it can do things in parallel easily that are difficult in other languages.
If the program your are trying to duplicate is complex it will be a non-trivial task, particularly if the source is not well documented, and/or you aren't familiar with both Jave (or C++ or VBasic, etc.) and LabVIEW. Good Luck!
02-08-2010 02:16 PM
Hello,
Given that the Java code is complex, I was thinking of using Java Invocation Interface that will help calling Java methods into C++ and then creating a shared object from c++, which can be imported in Labview.
I am however getting the following error while importing the shared object into LV:
"
The following header file was not found in the specified header file or one of the referenced header files:
- string
- iostream
- cstring
- jni.h
"
Are there any documents or resources that may be helpful.
Thanks.
-H
02-09-2010 03:24 AM
02-09-2010
04:56 PM
- last edited on
05-20-2025
12:37 PM
by
Content Cleaner
H P,
There are really two avenues you can go down when trying port Java code to LabVIEW:
1) You can build a DLL that hosts the JVM and uses the JNI interface to call Java Methods and then call that DLL in LabVIEW.
2) You can convert the .class or .jar files into .NET and then use .NET support in LabVIEW to call it (more info on .NET in LabVIEW here https://www.ni.com/docs/en-US/bundle/labview/page/using-net-assemblies-with-labview.html)
Overall, I think that the dll route would be better because dll support in LabVIEW is good but you have to figure out all the JNI and JVM stuff on your own. I'm not intimate with Java by any means but these were the two methods I have seen customers use and more customers use the first option more. As far as functionality in LabVIEW, I don't know if either one is better than the other. Hope this info helps!
08-13-2016 09:02 PM
I also have same problem, any one can help me out
08-15-2016 03:27 AM
discussion continued here…