Java

Invent your own java.lang Class

NoClassDefFoundError: java.lang.nmpcJackets

Huh?

That message greeted me as I attempted to start Compuware’s DevPartner J today. So I look at my JDK 1.4 class reference. Not there. Didn’t think it was. Googled it. 2 results – both related to one FAQ from Compuware.

So apparently they wrote a class that’s required for their product, and then called it a java.lang class! Novel idea – call it com.compuware.devpartner..nmpcJackets. That way, users that see this error will realize it’s a problem with the product configuration instead of thinking that something obscure has gone heinously wrong with their JDK. Ridiculous.

Advertisements

4 thoughts on “Invent your own java.lang Class

  1. How does the code see the class? I didn’t think you could create a java.lang object and load it from anywhere on the classpath. I thought java.lang objects could only be loaded from rt.jar?

    This would prevent someone else from creating a virus in java.lang.String.

  2. They’re in violation of their java development license — y’know, that part that you never read when you download the JDK from Sun??

    No one (other than sun) is allowed to ship classes whose prefix is java.* or javax.*

  3. I would agree that they’re probably using it to take advantage of some method or member of a class in java.lang that’s only visible from package scope.

    Since it’s a profiling tool, I guess it’s not that surprising, but still disconcerting and confusing.

Comments are closed.