- 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
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