BGS5 Netbeans/eclipse problems with hashtable, generics, changing JRE target | Telit Cinterion IoT Developer Community
September 4, 2015 - 6:26pm, 2441 views
Hello,
I am trying to create a hashtable however I get an error message in both Eclipse and Netbeans. I prefer to use netbeans however it says "generics are not supported -source 1.3". I have tried looking on google on how to change the target source however because it is a midlet application it does not have the option in the normal place. I tried to use ecplise which easily allows to change the target source however ecplise says that hashtable is not a generic and wont allow me to use hashtable<string, string>.
Anyone else been having similar issues?
I just realized that I was looking at the wrong CLDC docs. I need to use hashtable like this:
Hashtable userConf = new Hashtable ();
userConf.put("test", new Integer (5));
Integer n = (Integer)userConf.get("test");
if (n != null) {
System.out.println("two = " + n);
}
Even so I still get some warnings saying the source value is obsolete.
Hello,
Generics are not supported in the Java version for BGS5.
Please see the Java docs - if you have installed the provided software you will find the docs in Start/All Programs/Cinterion menu.
If you have imported some example project to Eclipse you can open Project properties and will find under the Java Compiler tab that the complience level is really set to 1.3 for the project.
Regards,
Bartłomiej