passing a value from parent thread to child thread
I am calling a java program from a unix script .
My oblectives are
1)to pass value from scripts to main java class
2)main class should create a child thread and pass data to child and should return control back to script
3)child thread should run independtly of parent
The calling unix script is part of process and hence should return control back to its calling script immediately.
1)Without passing data thru setter getter /constructor method to child thread my objectives are met
2)When I pass the data from parent thread to child thread calling unix scripts wait till child thread finishesh its working
java Main <list of Arguments>
public class Main
public static void main(String args) throws Exception
Child cu=new Child();
class Child extends Thread
public String data;
void setData(String data)
public void run()
----------> processing on data
I think due to passing of data from parent thread to child thread (Inter thread data communication/Inter process communication)
the threads are not working as desired.
Plz anybody can suggest something.....