Hi Matt,
Double-clicking doesn't work here because the Finder tries to
launches the JAR without a terminal attached, so System.in is
unavailable and System.out goes to the console.log.
I think the easiest way to get what you want is to write a wrapper
script, like you mentioned. Like if you're program is called
myApp.jar and needs arguments arg1 and arg2, you can create a
simple shell script like the following:
#! /bin/sh
java -jar /path/to/jarfile/myApp.jar arg1 arg2;
Make sure the file has its executable permission bit set.
The only caveat is that the Finder on your users system might not
be associating shell scripts with the Terminal application, so your
users would have to click "Get Info" for the file in the Finder and
specify Terminal in the Open With: section.
Then, double-clicking the script will open up a Terminal window and
execute your JAR.
Hope that helps,
Adam Ohren
email@hidden
"God does not play dice."
-- Albert Einstein
On Jul 23, 2007, at 12:42 PM, Matthew Strax-Haber wrote:
It's not that it is going to be for experienced users, but rather
that I have limited time, this is a quick-and-dirty project, and
will only be used by a small group of people for a few hours a month.
GUI is too much work for this project. What would be the best way
to write a "wrapper"? Please inform the uninformed :).
Your information and ideas were very helpful. Thank you.
Thanks,
~Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden