Menu

#83 Problems when calling Vm.exec() with parameters

open
nobody
None
5
2008-09-29
2008-09-29
No

When trying to invoke JVM from SuperWaba using the following command:

Vm.exec("/Windows/jeodek.exe", "-run s117_", 0, false);

It opened the MIDlet Manager, but couldn't find the appropriate JAR. This link calls /Windows/Jeodek.exe (Esmertec Java virtual machine), passing "s117_" as a parameter, what causes JVM to access /Windows/Appdb/s117_suite.jar (my application jar). It works fine when using a .lnk under Windows Mobile:

32#"\windows\jeodek.exe" -run s117_

I have noticed that the JVM starts (because the splash screen appears), but then it suddenly crashes, because the screen disappears (probably receiving an exception and terminating the application). The only explanation I could think of is that parameters are passed wrongly to the operating system.

After the method is called and the program is terminated, the /Appdb directory was created (under the root folder, not under /Windows!), and probably the parameter somehow caused the JVM to search inside this directory instead of /Windows/Appdb (I just don't know HOW Vm.exec() did that).

Obviously, I tried to copy the JAR file directly to the /Appdb but it still didn't work. As I imagined, the parameter is being passed wrongly to the operating system...

Discussion


Log in to post a comment.

Auth0 Logo