The Artima Developer Community
Sponsored Link

Java Answers Forum
Reflect Error (bug?)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Antonio

Posts: 33
Nickname: arhak
Registered: Jul, 2005

Reflect Error (bug?) Posted: Jul 7, 2005 1:47 AM
Reply to this message Reply
Advertisement
I would like to know if this is a bug.
It seems to me.
The following code causes an java.lang.Error instead of an java.lang.Exception

package test;
 
public class Main {
  public static void main(String[] argv) {
    try {
      Class.forName("test.maiN");
    }
    catch(ClassNotFoundException ex) {
      System.out.println("Exception catched");
    }
  }
}
 
java.lang.NoClassDefFoundError: test/maiN (wrong name: test/Main)
at java.lang.ClassLoader.defineClass0(Native Method)
...


In several oportunities I have worked with reflection and I have always been forced to add a catch for this LinkageError when I think that is not right since JBuilder 3 till JBuilderX and I don't think that is the Borland Make JDK because I have tried with others JDKs

Topic: identifying  live processes Previous Topic   Next Topic Topic: java io question - pls help

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use