4

I am trying to make AppBundler more observable and have had great success except for one thing. JLI_Launch does not return to the caller so I can't tell if it fails to load the main class (or any other error that would prevent it from starting).

I would consider the alternative of using JNI_CreateJavaVM to start the JVM but I believe I'd have to write a lot more code to replace JLI_Launch with it. And I don't really know if that would address this problem. The main reason I like JLI_Launch is that it closely matches what one would type at the command line. And so I believe it's easier for everyone (me and the app's end users) to understand.

So far, the only workaround I can imagine is using atexit and see if the current time is within a second or two of when JLI_Launch was called. Of course, I hate that idea but it's the only thing I can try right away.

In the meantime, I've redirected stderr and can see the error in the log file. But it would be nice if I could prompt the user to look at it. As it stands, the app doesn't start and I have to know to look at the file. It would be nicer if I could display an alert.

0

Browse other questions tagged or ask your own question.