java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr2-20080818_01(SR2))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460-20080816_22093 (JIT enabled, AOT enabled)
J9VM - 20080816_022093_BHdSMr
JIT - r9_20080721_1330ifx2
GC - 20080724_AA)
JCL - 20080808_02
What version of the IBM JDK is this? It's rather odd that we can't access something with a "public" modifier.
On May 11, 2009, at 2:20 PM, Amit Agarwal wrote:
I have a jython script on AIX (with IBM JDK) that parses a HashMap and prints its keys and values.
The HashMap signature is HashMap<String,String> and I want to print both the keys and values in a loop.
I get an iterator over the keys in this hashmap but when I try to check for more elements, I get the following exception -
java.lang.IllegalAccessException: java.lang.IllegalAccessException: Class org.python.core.PyReflectedFunction can not access a member of class java.util.HashMap$AbstractMapIterator with modifiers "public"
Here is how my script looks like (the same script works fine on Linux)
keys = map.keySet()
iter = keys.iterator()
while (iter.hasNext() == 1): // This is the line that throws the exception
keys = iter.next()
Any suggestions? If there's another way to print keys/values of the hashmap that works on AIX, please let me know.