| Author |
Displaying name of class that contains main
|
Pete Hitchman
Greenhorn
Joined: Oct 29, 2002
Posts: 4
|
|
Hi, I am writing a java application and I am checking the number of arguments passed on the command line and if this fails printing out a usage message. I would like the usage message to include the name of the class that contains the main method. How do I access this information?
|
Regards<br /> <br />Pete
|
 |
Rene Larsen
Ranch Hand
Joined: Oct 12, 2001
Posts: 1179
|
|
Try this Rene
|
Regards, Rene Larsen
Dropbox Invite
|
 |
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
|
|
If you are WRITING the app . . . (I must be missing something here . . . )
|
"JavaRanch, where the deer and the Certified play" - David O'Meara
|
 |
Rene Larsen
Ranch Hand
Joined: Oct 12, 2001
Posts: 1179
|
|
or if you want to get the Class name from a method other then a static one: Rene
|
 |
Pete Hitchman
Greenhorn
Joined: Oct 29, 2002
Posts: 4
|
|
|
Thanks people.
|
 |
 |
|
|
subject: Displaying name of class that contains main
|
|
|