Logi Ragnarsson wrote:
> 
> Hi!
> 
> I'm one of those eagerly awaiting the arrival of jdk1.2 for linux, but
> in the short term all I really need is the collections API. (I'm going
> to write abstract algebra/group theory classes and subclassing Set
> seems like a good idea.) Does anyone know if it would be possible to
> simply use the collections classes (and maybe others) from the jdk1.2
> api on the current linux jvm? There doesn't seem any reason to code
> them in a way that would only work on jdk1.2.

Sun packaged up a version of the collections classes for JDK1.1, which
you can find with a little searching on their site. It's working well
for me.

The main difference between the 1.1 and 1.2 flavor of the collections,
as I understand it, is that the 1.2 collections are part of the core and
the 1.1 collections live in a strange and different package,
com.sun.java.util.collections . Reason is that some SecurityManagers,
such as those found in most browsers, balk at loading non-core classes
named to look like core classes.

So if you're working in an environment where the security thing might be
a concern -- say, you're building applets and including the collections
classes in the jarfile -- you'll have to use the 1.1 versions and change
a few "import" statements when you finally move to 1.2. If that's not a
concern, I suspect that you're right -- the 1.2 collections code
probably works in a 1.1 environment.

Nathan Meyers
[EMAIL PROTECTED]

Reply via email to