@@ -32,7 +32,7 @@ public static void main(String[] args) throws AlreadyBoundException, NotBoundExc
32
32
links = new HashMap <Integer , List <Link >>();
33
33
initializeEdges ();
34
34
// "clients" files contain the name of the remote processes used
35
- BufferedReader br = new BufferedReader (new FileReader ("tests/nodes2 .txt" ));
35
+ BufferedReader br = new BufferedReader (new FileReader ("tests/nodes1 .txt" ));
36
36
String line = br .readLine ();
37
37
numProc = Integer .parseInt (line );
38
38
localProc = 0 ;
@@ -52,7 +52,7 @@ public static void main(String[] args) throws AlreadyBoundException, NotBoundExc
52
52
boolean success = false ;
53
53
while (!success ){
54
54
try {
55
- registry .bind ("//145.94.233.58 :" +Constant .RMI_PORT +"/" +split_line [0 ], new Node (i , new PriorityQueue <Link >(links .get (i ))));
55
+ registry .bind ("//145.94.234.109 :" +Constant .RMI_PORT +"/" +split_line [0 ], new Node (i , new PriorityQueue <Link >(links .get (i ))));
56
56
success = true ;
57
57
}
58
58
catch (RemoteException e ) {
@@ -65,15 +65,12 @@ public static void main(String[] args) throws AlreadyBoundException, NotBoundExc
65
65
i ++;
66
66
}
67
67
br .close ();
68
- System .out .println ("Press enter to continue" );
69
- Scanner scan = new Scanner (System .in );
70
- scan .nextLine ();
71
68
setRegistry ();
72
69
System .out .println ("Client 1 started" );
73
70
}
74
71
75
72
public static void initializeEdges () throws IOException {
76
- BufferedReader br = new BufferedReader (new FileReader ("tests/edges2 .txt" ));
73
+ BufferedReader br = new BufferedReader (new FileReader ("tests/edges1 .txt" ));
77
74
String line ;
78
75
int node1 ;
79
76
int node2 ;
@@ -124,10 +121,7 @@ public static void setRegistry() throws NotBoundException, NumberFormatException
124
121
RemoteProcess p = new RemoteProcess (RMI_IDS [localIDS .get (i )]);
125
122
myThreads [i ] = new Thread (p ); // and a new thread is created
126
123
}
127
-
128
- System .out .println ("Press enter to continue" );
129
- Scanner scan = new Scanner (System .in );
130
- scan .nextLine ();
124
+
131
125
myThreads [0 ].start ();
132
126
myThreads [1 ].start ();
133
127
}
0 commit comments