I need to open a java jar file in labview........this jar file is a GUI with multiple frames and has buttons on each frame help navigate through between frames....i just require the program to open it and close it based on some signals so then i won't have to do it manually
Thank you that worked perfectly.......is it possible to even close the same file programmatically when some conditions are met????
LabVIEW doesn't have any control over what happens in a system exec, as you give the control to the system. You can, however, check the process list through .NET commands and kill the process (You should be able to stop it through "taskkill /F /im java.exe"). Not the prettiest solution, but should work. 🙂
i used the taskkill command and tried to stop it with system exec but nothing happened......!!!the jar file was still open.i have attached a snapshot of the program.Have i made a mistake...???
You need a space between /F and /IM, and if you check your task manager i bet you need to kill Java.exe and cant see your .jar specifically.
yeah you're right........i can't see my jar file on task manager.....but that still leaves the file open although i want it to be closed.....can the taskkill function do this???
Since I got the problem with not getting a .jar running, I want to add: use "cmd /c" when calling your java.jar via system exec:
cmd /c START /b java -jar JavaApp.jar
I didn't looked at the error message for a while which said "Error 2: memory full" (see here: http://digital.ni.com/public.nsf/allkb/EA1600EBA422E97286256AA20073C616)
System : Win7 x64, LV 2014