Basically I am doing project on Ewon Flexy hardware, Ewon hardware only supports jre javaetk, which is quite old. Now I have to use the concepts of HashMap in my project and but javaetk doesn't support HashMap . So is there any way I can use the functionality of latest JRE in older version of JRE?? Thanks in advance!
Asked
Active
Viewed 309 times
0
-
1You might (need to) live with **Hashtable** instead. – Joop Eggen Feb 18 '19 at 08:29
-
Or the `Properties` class – Feb 18 '19 at 08:31
-
2If it is really a Java 1.4.2 then `HashMap` should be available (`HashMap` was added in Java 1.2). There will be no generics however, but `Map m = new HashMap();` should work – Thomas Kläger Feb 18 '19 at 08:33
-
It's not java 1.4.2, its javaetk 1.4.2 @ThomasKläger – Vineet Gandhi Feb 18 '19 at 08:38
-
I just downloaded javaetk from "https://developer.ewon.biz/content/java-0", looked into the included "javaetk.jar" and it contains the class files for "java.util.HashMap" and "java.util.Map". So where is the problem with using them? – Thomas Kläger Feb 18 '19 at 10:32
-
Yes, it is there but still if I use it, then it gives compile time error that change ur JRE to 1.7 @ThomasKläger – Vineet Gandhi Feb 18 '19 at 11:41
-
What is the compiler error message? – Thilo Feb 20 '19 at 08:26
-
What does `java -version` say? – Thorbjørn Ravn Andersen Mar 02 '19 at 07:51
1 Answers
0
You cannot provide type for key and value but you can use it as follows: HashMap map = new HashMap() or Map map = new HashMap()

DhrutiC
- 11
- 1