FreeBSD - "Class.getClasses" problem
From: Michael Wright (mwright_at_ubiquity.net)
Date: 10/06/03
- Next message: Blaise: "[image] Optimize image load"
- Previous message: nsb: "JDBC - sending Clob data via RMI"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 6 Oct 2003 03:17:28 -0700
I'm using Java 1.4.1, on FreeBSD 5.1.
I have a problem where I'm attempting to use reflection to get a list
of the classes that a given class extends. The problem is that the
method call "Class.getClasses()" always returns an empty array, when
it is called. I've tried it with a number of different classes, my
own, and the standard API classes, always getting back the same
result. The "Class.getDeclaredClasses()" also has the same problem.
I used the following code to verify this behaviour:
////////////////////////////////
Class[] aclassExtends = Class.forName(strClassName ).getClasses();
for (int iClassIndex = 0; iClassIndex < aclassExtends.length;
++iClassIndex )
{
Class classExtend = aclassExtends[iClassIndex ];
System.out.println("class:" + classExtend.getName() );
}
////////////////////////////////
This should output the names of all classes and interfaces that the
given class extends and implements. It works on other OS (tested on
OSX and Windows 2K), but not on FreeBSD.
Has anybody else experienced this problem? If so, is there a patch or
a workaround available?
Any help would be appreciated.
Thanks,
Michael
- Next message: Blaise: "[image] Optimize image load"
- Previous message: nsb: "JDBC - sending Clob data via RMI"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|