Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: Execute the file
|
Posted: Mar 17, 2002 1:25 PM
|
|
First, do didn't say what platform you are talking about and this is a very platform-specific question, but I'll assume it is Windows, based on what you've said.
If you want to be able to run class or jar files by double-clicking them, you need to set up an association for them in Explorer. However this is a mess, because Java wants the class file specified without the extension (one would think they would be smart enough to handle both! How hard is it to either strip or add ".class" from a specified class or file name?), whereas Explorer will pass the full file name. However, there is a detailed explanation of how to set this up in Artima's legacy Java Answers Forum. If you can't find it, report back here and we'll add it to this forum. The jar file is a little easer to handle and that is also covered in a previous post, so the follow the same procedure with it.
Also keep in mind that the association can be changed when you install some application that thinks it is the best choice for handling these files. For instanace, after I installed JBuilder, it appropriated the class file association.
|
|