(26.08.2010, 13:49)routeconverter Wrote: (26.08.2010, 10:57)hvdwolf Wrote: (25.08.2010, 21:12)routeconverter Wrote: Did you try my Java6Check jar on your machine?
Yes, I did. But as mentioned I'm now on Snow Leopard and I don't have Java 1.5 anymore. So it works for me.
Sorry, I wasn't precise: did you integrate the Java6Check into your shell script? I'm planning to spend some time to get exactly your ZIP layout since a lot of Mac OS X users ask me how to use RouteConverter and I'm tired of explaining the -XStartOnFirstThread stuff 
Yes, I already did that. I built a mini-Applescript application that shows a graphical popup in case the java version is too low: see attached image.
the script itself is:
Code:
#!/bin/sh
BASEDIR=`dirname $0`
if `exec java -jar $BASEDIR/Java6Check.jar`; then
# No error, java version >= 1.6.0_14
echo "java version >= 1.6.0_14"
exec java -XstartOnFirstThread -jar $BASEDIR/RouteConverterPrereleaseMac64.jar
else
# java version < 1.6.0_14
echo "java version < 1.6.0_14"
open error_message.app
exit 1
fi
the echo commands are not really neccessary but if a user whould open the application from the command line like "open RouteConverter64.app" it would also echo to terminal.
Note: I used the "RouteConverterPrereleaseMac64.jar" but that can be replaced off course. Both in the script and the application.
The structure of the Application now is (I removed unnecessary listing info):
Code:
ls -lR RouteConverter64.app
RouteConverter64.app/Contents:
Info.plist
MacOS
Resources
RouteConverter64.app/Contents/MacOS:
Java6Check.jar
RouteConverterPrereleaseMac64.jar
error_message.app
routeconverter
RouteConverter64.app/Contents/Resources:
RouteConverter.icns
1 - I wrote this simple applescript application (10 minutes work), but I don't know whether your application does shows a (graphical) error message of it's own as I can't test that right now. Does it?
If it does we can remove my error_message.app, which I really like to do. It's not nice to mix up a real Java application with an applescript application. To me it doesn't feel right.
If your Java6Check.jar shows it's own graphical message the script could change to:
Code:
#!/bin/sh
BASEDIR=`dirname $0`
if `exec java -jar $BASEDIR/Java6Check.jar`; then
# No error, java version >= 1.6.0_14
echo "java version >= 1.6.0_14"
exec java -XstartOnFirstThread -jar $BASEDIR/RouteConverterPrereleaseMac64.jar
else
# java version < 1.6.0_14
echo "java version < 1.6.0_14"
exit 1
fi
2 - I did not make a patch or something like that yet. It's easy to do but I like to know how you think about it, especially in case your jar show it's own message already.
3 - Just in case I added the error_message.app in a zip and the message itself