} catch (IOException e) {
// means portNo not in use
MessageBox alert = new MessageBox(shell, SWT.OK);
- alert.setMessage("Can not start the target: " + property.getName() +"\nVirtual target with the same name is running now!"
- + "If not, delete port info file: " + PortPath);
+ alert.setMessage("Can not launch this target: " + property.getName()
+ + "\n※ Predictable Causes are below."
+ +"\n1. Virtual target with the same name is running now."
+ + "\n2. Emulator might be terminated abnormally before."
+ + "\nIf case 1, exit existing virtual target and re-launch."
+ + "\nIf case 2, delete the port info file: " + PortPath);
alert.open();
return;
}
pb3.start();
}
cmd.add("-serial");
- cmd.add("file:emulator.klog");
+ cmd.add("file:" + EmulatorVMs.getInstance().getVMsBaseDirectory() + File.separator +property.getArch().toString() + File.separator + property.getName() + File.separator + "logs" + File.separator + "emulator.klog");
cmd.add("-m");
cmd.add(String.valueOf(property.getConfiguration().getDevice().getRAM().getSize().getValue()));
cmd.add("-M");
package org.tizen.emulator.manager.tool;
import java.io.IOException;
+import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;
public class PortHelper {
- Socket so;
+ ServerSocket so;
public int getPortNo()
{
int port;
for(port=26100;port < 26200; port += 10) {
try {
- so = new Socket("localhost", port+1);
- } catch (UnknownHostException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ so = new ServerSocket(port+1);
+ return port;
} catch (IOException e) {
// TODO Auto-generated catch block
- return port;
+ continue;
}
}
return -1;