Hi
How can I execute a jar file inside my b4j app. I am using the shell function to execute a jar file that gets generated by my app however its giving me an error that it cannot create the java virtual machine.
Below is my shell function which works for other operations.
This is what I am passing to it to give those results
sPath
C:\Program Files (x86)\Java\jre1.8.0_77\bin\java.exe
sParameters
-jar C:\Users\Mash\Dropbox\MyApps\b4j\SOURCE~1\ABMaterial.Show\Objects\Projects\MyMaterial\Objects\MyMaterial.jar
The InQuotes sub just puts Quote inbetween the path.
Can someone please advise? Thanks
How can I execute a jar file inside my b4j app. I am using the shell function to execute a jar file that gets generated by my app however its giving me an error that it cannot create the java virtual machine.
Below is my shell function which works for other operations.
B4X:
Sub RunWSH(sPath As String, sParameters As String)
Dim shl As Shell
Dim lstParams As List: lstParams.Initialize
Try
' define the script to execute pass it the BAL and BIL files
sPath = jMash.InQuotes(sPath)
lstParams.Add(sParameters)
shl.Initialize("shl", sPath, lstParams)
shl.WorkingDirectory = ProjectPath
shl.Run(-1)
Catch
Log(LastException.Message)
End Try
End Sub
This is what I am passing to it to give those results
sPath
C:\Program Files (x86)\Java\jre1.8.0_77\bin\java.exe
sParameters
-jar C:\Users\Mash\Dropbox\MyApps\b4j\SOURCE~1\ABMaterial.Show\Objects\Projects\MyMaterial\Objects\MyMaterial.jar
The InQuotes sub just puts Quote inbetween the path.
Can someone please advise? Thanks