The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
June 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Type Descriptors in Class Files

Posted by Bill Venners on June 01, 2000 at 11:26 PM

> Recently I received a runtime error indicating :
> "no signature matching Ljava/lang/Sting .....

> The error was present on an attempt to invoke a method with
> java.lang.String as a param.

> I am told that Ljava refers to an array of String.
> Does anyone know if this is true ?

Looks like you've been stung by a typo. Unless the typo is in
your forum post rather than your program, you've left out the
"r" in String.

"Ljava/lang/String;" is a type descriptor, the kind you'll find
in Java class files. It just means a reference type with the
name "java.lang.String". The descriptor for an array of String
would be: "[Ljava/lang/String;"

I describe type descriptors in chapter 6 of my JVM book, but
unfortunately I haven't yet posted that chapter to
I plan to in the future, so check back from time to time if
you are interested. The online chapters are at:



Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us