Storing data into Hashmap and getting the same !!!!

hi,

I have got a strange doubt..Please tell me if i can do this ..

Suppose I have a program called get.java which get the data from user and stores it in HashMap .This Prgm is running in one command Prompt.

And I have another Program called show.java in another command Prompt which will get the Data from HashMap and Display it..

My Question is Can the Prgm show.java get the Values from the HashMap which is stored by get.java ?

I hope iam Clear with the Question ..

Please please let me know if this is Possible ...

Thanks in Advance ..

iwishtolearn@rediffmail.com

[636 byte] By [iwishtolearn] at [2007-9-26 2:38:26]
# 1

NO. each instance of java will spawn a new JVM. What you need is a client server architecture.

Start your server with the first java command. Be sure it stays running.

Then start your client which will connect to the running server which are in seperate JVMs by using RMI (simpliest way). Call the method on the client which will RMI on the serverand get the value back.

dnoyeB at 2007-6-29 10:09:19 > top of Java-index,Core,Core APIs...
# 2
Thank U sir for Ur Reply ..But can U explain me a bit more on this ..I not clear Still....Thankx in advance ...
iwishtolearn at 2007-6-29 10:09:19 > top of Java-index,Core,Core APIs...
# 3
..or you might consider using a database
vograh at 2007-6-29 10:09:19 > top of Java-index,Core,Core APIs...
# 4
Is there any other Option other than RMI to Solve this Problem ..
iwishtolearn at 2007-6-29 10:09:19 > top of Java-index,Core,Core APIs...