views:

642

answers:

4

Hey everyone,

Is there any reason that I would be missing the java.util.HashMap package? I have java.util.Hashtable, but no HashMap...

I have the most up to date JDK and JRE...

Thanks!

+8  A: 

Wow - that's weird! Could it be that your working on a mobile app like development for a Blackberry? The Blackberry Java does have a java.util.Hashtable but no java.util.HashMap... This would be a perfect match for your problem ;)

Edit

If you want to develop Blackberry applications, then you have to use the 'Blackberry Java', because that is the Java that is installed on the mobile. Otherwise just install a fresh eclipse on your machine. You can have as many eclipse IDE's on your machine as you like. They do not interfere.

Andreas_D
That is precisely what I am doing! I guess I should have mentioned that. The Blackberry plugin installed Eclipse for me. Instead, should I install Eclipse first, and then specify (in the plugin installation) an existing Eclipse installation?
behrk2
Bingo :-)) Yes, we usually assume SUN Java SDK or something else when we just read java
Andreas_D
Thank you so much!
behrk2
A fresh eclipse? I would just add another workspace and pick the desired one during startup.
BalusC
I think there's a solution for beginners and for pros - and I don't know the setup of this special 'Blackberry-eclipse'.
Andreas_D
A: 

If you're using Eclipse, is the JDK in the classpath for the project itself? Although you're eclipse instance may be pointing to the JDK, it may not be available within the project's own classpath.

As well, are you using the standard JDK? If you're using an implementation of the JDK that has a subset of the full JDK, that library may not be available.

Stephane Grenier
A: 

BlackBerry devices use a subset of the Java API called J2ME. It does not have all of the features of the regular JDK, such as collections.

Marc Novakowski
A: 

Blackberry has a different implementation for HashMap , it has a class called multimap under net.rim.device.api.util.MultiMap which is similar to HashMap.

It can be used to do similar task as HashMap. The documenation can be found here.

Supported since API 4.3.0