File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Compiler Message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compiler Message" Watch "Compiler Message" New topic
Author

Compiler Message

Arthur Blair
Ranch Hand

Joined: Sep 20, 2005
Posts: 71
I've got this compiler message that I don't understand:


I have a method with the following signature in FormatUtil.java:



I am trying to call the method like this:

Object value = null;
value = ReflectionUtil.invokeGetter(toCall,myRow); // this returns a String, but that shouldn't be a problem, right?
value = FormatUtil.getMappedVersion(value, myColumn);

Can someone help decipher it please?

I would like to know:

  • what the 'L' means
  • What is causing the error
  • What the "Ljava/lang/String;" means?


  • Thoughts appreciated.
    [ December 12, 2005: Message edited by: Arthur Blair ]
    Ernest Friedman-Hill
    author and iconoclast
    Marshal

    Joined: Jul 08, 2003
    Posts: 24183
        
      34

    "Ljava/lang/String;", including the "L" and the ";", is the way Java class names are indicated in the Java class file format. There's a whole system of codes to name different types: I for int, Z for boolean, and Lclass/name; for classes.

    Without seeing exactly what ReflectionUtil.invokeGetter is doing, it's hard to say what's causing this error.


    [Jess in Action][AskingGoodQuestions]
    Jeff Albertson
    Ranch Hand

    Joined: Sep 16, 2005
    Posts: 1780
    That's a runtime error, so I wouldn't call it a compiler message.
    It seems to me that you haven't compiled all your classes in
    a consistent manner. Rebuild your app and try again.


    There is no emoticon for what I am feeling!
    Arthur Blair
    Ranch Hand

    Joined: Sep 20, 2005
    Posts: 71
    I rebuilt and it worked. Strange.

    Thanks for the replies.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Compiler Message
     
    Similar Threads
    Help with returning one string from three methods of type string?
    String Immutable!
    Spring inject a list
    java class file
    Mixing generic and non generic legacy code issue