#If TargetWin32
StartShell.Execute("java -jar my.jar command")
#ElseIf TargetMacOS
StartShell.Execute("cd /Applications/myJavaApp ; sudo -S java -jar my.jar command")
#ElseIf TargetLinux
StartShell.Execute("cd /usr/local/myJavaApp ; sudo -S java -jar my.jar command")
#Endif
I would need to cd before running the jar file in windows… but I don’t think windows likes separating commands with ;s
Use an ampersand instead of a semicolon.
#If TargetWin32
StartShell.Execute("cd /Applications/myJavaApp & java -jar my.jar command")
#ElseIf TargetMacOS
StartShell.Execute("cd /Applications/myJavaApp ; sudo -S java -jar my.jar command")
#ElseIf TargetLinux
StartShell.Execute("cd /usr/local/myJavaApp ; sudo -S java -jar my.jar command")
#Endif
Thanks!
Pardon the newbie windows questions but TargetWin32 has nothing to do with the windows system being 32 bit or 64 bit does it?
No. It indicates the type of Xojo app being run. As Xojo only makes 32-bit apps, this always returns True on Windows.
so does it matter if its a windows desktop application or a stand alone web program?