![]() |
how to determine if jar or class file is executable
How can I determine if a particular class file/jar file is directly
executable, meaning it has a main etc. |
Re: how to determine if jar or class file is executable
On 15 Aug 2003 14:45:16 -0700, jobs239@hotmail.com (kaith) wrote or
quoted : >How can I determine if a particular class file/jar file is directly >executable, meaning it has a main etc. You can read and parse the manifest. It is just a text file entry. I don't know of a more direct way. It still won't necessarily execute. -- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary. |
Re: how to determine if jar or class file is executable
Roedy Green <roedy@mindprod.com> wrote in message news:<qmqqjvgkqe445l91jpsblufb8nqap6gruk@4ax.com>. ..
> On 15 Aug 2003 14:45:16 -0700, jobs239@hotmail.com (kaith) wrote or > quoted : > > >How can I determine if a particular class file/jar file is directly > >executable, meaning it has a main etc. > > You can read and parse the manifest. It is just a text file entry. I > don't know of a more direct way. It still won't necessarily execute. To read the manifest use http://java.sun.com/j2se/1.4.2/docs/...l#getManifest() For the class you could use reflection to see is a method public static void main(String[] args) is present. |
| All times are GMT. The time now is 10:02 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.