[haiku] Re: Launching .jar files

  • From: pete.goodeve@xxxxxxxxxxxx
  • To: haiku@xxxxxxxxxxxxx
  • Date: Wed, 26 Dec 2012 14:32:54 -0800

[Everyone else has said it, but I'll say it too... (:-/)
*Please* find some way to avoid sending only HTML in your mails!
To get your text into any sort of replyable form, I have to do all
sorts of cutting, pasting, and massaging.  Normally I just won't
bother.]

On Tue, Dec 25, 2012 at 08:42:25PM +0000, Jimmy wrote:
>  Hi all,
>  Anyone know how I can get .jar files to launch via associating
>  them with a script or directly with "java -jar $1..."?
> 
>  Basically, right now I have an xicon script with "java -jar $1" in it
>  and it works to launch .jar files when I drop them on the script file,
>  but I would like to be able to double click the .jar file itself to
>  launch it, and would like to avoid using xicon if possible.

Why would you *ever* not want to use xicon...? (:-))

Seriously, though, I may be missing something, but I can't think of
any simple way.  The best I can suggest would be writing a short app
(with a signature) that essentially executes the above java command.
You could then use the FileType add-on to assign that as the preferred
application of your jar files, and could then double-click them to run.
(That assumes of course that they don't need the Terminal window that
xicon provides.  Actually, come to think of it, xicon itself could
probably be used as a base for that app, giving you a Terminal too,
if you wanted it.)

This does bring up the point that I can think of some extra capabilities
I'd love to have in Tracker or wherever.  I think haiku_dev will be a
better place to post those, thgough.

BTW, *what* java are you using?  The only one I see that looks somewhat
useable is 'Harmony' on Haikuware.  I have no real current need for the
language, though, so I haven't tried it.

        -- Pete --


Other related posts: