Re: Find name of package
Daniel Rocha <[email protected]> Fri, 29 Aug 2008 09:34:31 -0500
| Newsgroups | gmane.comp.java.sun.kvm |
|---|---|
| Message-ID | <[email protected]> |
There's no getPackage() method, but you can do something like that: Class class =3D object.getClass().getName(); It will return something like "[Ljava.lang.Object;" and you can parse the result to extract "java.lang" which would be the package name. []s Daniel=20 Forum Nokia=20 -----Original Message----- From: A mailing list for KVM discussion [mailto:[email protected]] On Behalf Of ext [email protected] Sent: Friday, August 29, 2008 11:34 AM To: [email protected] Subject: Find name of package I want to find out the name of package where is class in which I'm working just as you can find it out in J2SE with [b]Class_Name.class.getPackage()[/b]. Is there solution for J2ME? [Message sent by forum member 'quo' (quo)] http://forums.java.net/jive/thread.jspa?messageID=3D296195 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D To unsubscribe, send email to [email protected] and include in the body of the message "signoff KVM-INTEREST". For general help, send email to [email protected] and include in the body of the message "help". =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D To unsubscribe, send email to [email protected] and include in the body of the message "signoff KVM-INTEREST". For general help, send email to [email protected] and include in the body of the message "help".