import org.eclipse.ui.PlatformUI;
class Monitor extends Thread {
+ static int portNumber = 6824;
public boolean bDARunning = false;
+
public void run( ) {
try {
- ServerSocket local = new ServerSocket(56592);
+ portNumber += 12345;
+ ServerSocket local = new ServerSocket(portNumber);
local.accept();
} catch (SocketException e) {
- System.out.println("Application Running 1\n");
bDARunning = true;
} catch (IOException e) {
e.printStackTrace();
Shell dialog = new Shell(display);
Shell shell = new Shell(dialog);
- shell.setSize(460, 153);
+ shell.setSize(420, 153);
FormLayout shellLayout = new FormLayout();
shell.setLayout(shellLayout);
shell.setText("Info");
buildTime.setForeground( new Color( display, 0, 0, 0 ) );
FormData labelData = new FormData();
- labelData.left = new FormAttachment(0, 10);
+ labelData.left = new FormAttachment(0, 23);
labelData.top = new FormAttachment(0, 6);
labelData.height = 64;
- labelData.width = 45;
+ labelData.width = 35;
icon.setLayoutData(labelData);
labelData = new FormData();
ApplicationWorkbenchWindowAdvisor.appName = args[1];
}
- Monitor monitor =new Monitor( );
- monitor.start( );
+ Monitor monitor_1 =new Monitor( );
+ monitor_1.start();
+ Thread.sleep(100);
+
+ Monitor monitors_2 =new Monitor( );
+ monitors_2.start();
Thread.sleep(100);
- if ( monitor.bDARunning == true )
+
+ if ( monitor_1.bDARunning == true && monitors_2.bDARunning == true )
{
- RunningDlg( display );
+ RunningDlg(display);
}
int returnCode =PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
-
if (returnCode == PlatformUI.RETURN_RESTART) {
return IApplication.EXIT_RESTART;
} else {