File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes enum problem with multiple class loader Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "enum problem with multiple class loader" Watch "enum problem with multiple class loader" New topic
Author

enum problem with multiple class loader

Atipon Pongpat
Greenhorn

Joined: Oct 14, 2004
Posts: 1
Since enum in java 1.5 is a reference type (obviously extends from class java.lang.Enum). Is this a problem if I try to compare two enum that is loaded from different class loader with the == operator?
for example.

The output is "false" because e is not the same instance with e2. Is this a flaw or something that already concerned by the java language designer?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8876

Is this a flaw or something that already concerned by the java language designer?


Same Class loaded from different classloader will be different.


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: enum problem with multiple class loader
 
Similar Threads
How can we determine whether an object's reference variable is null or not?
Enum optional semicolon
Enums
TreeSet with compartor constructor
How can we count the number of objects created per class using Java1.5 API?