My jython program is not able to show the contents of HashMap of a java program

Joined
Jun 9, 2011
Messages
1
Reaction score
0
Hi,
Hope everyone is doing well.
I am writing a jython program which could be able to access a hashmap of another running java program.
java program is as follows:

import java.util.*;

public class simple
{
public static HashMap ss = new HashMap();
public static void main(String z[])
{
try
{
for(int i=0;i<89;i++)
{
ss.put(i,"ss--->"+i);
Thread.sleep(1000);
if (i==10)
System.out.println("0111 = "+get());
}
}
catch(Exception e)
{
e.printStackTrace();
}
System.out.println("hashmap = " + ss);
}

public static HashMap get()
{
return ss;
}

public HashMap getC()
{
return ss;
}

}

I am trying to run my jython program while above java program is running

>>> import java.util.HashMap
>>> import simple
>>> hs=simple.get()
>>> print hs
{}
>>>

It is not at all printing anything.
Please help

Thanking you
Mahendra Chaurasia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top