J
joseph_daniel_zukiger
I thought I knew this once, but maybe I was just fooling myself.
this.getClass().getName() doesn't work from static methods, so it
doesn't work from main().
The reason I want to do such a silly thing is that I don't want to go
looking for the bare string "MainClass" when I decide to change the
name of the MainClass to something a little more descriptive, like,
ProjectA or something. I need it to tell Mac OS X what to call the
application menu from within the program. (I know this is not what
Apple recommends.)
Checking Google dug up a thread on GCJ, with a proposed
gnu.gcj.progname property.
Can this be done in standard Java?
this.getClass().getName() doesn't work from static methods, so it
doesn't work from main().
The reason I want to do such a silly thing is that I don't want to go
looking for the bare string "MainClass" when I decide to change the
name of the MainClass to something a little more descriptive, like,
ProjectA or something. I need it to tell Mac OS X what to call the
application menu from within the program. (I know this is not what
Apple recommends.)
Checking Google dug up a thread on GCJ, with a proposed
gnu.gcj.progname property.
Can this be done in standard Java?