The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

A Step Further for Ease of Clicking

Posted by Matt Gerrans on January 17, 2002 at 10:36 PM


> Microsoft's Java SDK4.0 has jexegen.exe tool which generates exe files from class files. You can download that for free from Microsoft's website.

> Personally, I am not a big fan of jview.exe. And yeah I got that liking to 'clickables' too. So I satisfy my urges by creating batch files. All you need to do is create a file with .bat extension. Within it type (assuming myClasses.jar is your jar file):
> java -jar myClasses.jar
> But make sure you have a manifest file which declares your main class. Rock n Roll.

You can set up the file association of .jar (in Explorer's File Types dialog, or directly with RegEdit for the bolder among you) to this:

C:\YourPathToJava\javaw.exe -jar

Then, when you double-click on any jar file, it will be executed (not in the jurisprudence, sense, thankfully).

It is also handy to set up a right-click item for jar files to open them with WinZip.





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us