Bug 531631 - Replace usage of System.getProperty("file.separator")

Change-Id: If1fac407e03cfb5a58444743f9d7279f0d749f9a
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java
index 3eb9e7d..8667fe0 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java
@@ -713,9 +713,9 @@
 			int index = 0;
 			String binDirectory =
 				fTargetAddress
-					+ System.getProperty("file.separator")
+					+ File.separatorChar
 					+ "bin"
-					+ System.getProperty("file.separator");
+					+ File.separatorChar;
 
 			proxyString[index++] = binDirectory + "j9proxy";
 			proxyString[index++] = "localhost:" + (fBackEndPort - 1);
@@ -759,8 +759,8 @@
 			} else {
 				binDirectory.append(fTargetAddress);
 			}
-			binDirectory.append(System.getProperty("file.separator"));
-			binDirectory.append("bin").append(System.getProperty("file.separator"));
+			binDirectory.append(File.separatorChar);
+			binDirectory.append("bin").append(File.separatorChar);
 
 			Vector<String> commandLine = new Vector<>();
 
@@ -798,9 +798,9 @@
 			// Launch target VM
 			String binDirectory =
 				fTargetAddress
-					+ System.getProperty("file.separator")
+					+ File.separatorChar
 					+ "bin"
-					+ System.getProperty("file.separator");
+					+ File.separatorChar;
 
 			Vector<String> commandLine = new Vector<>();
 
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java
index b0ea3ed..77ac963 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java
@@ -18,6 +18,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
+import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Modifier;
 import java.util.ArrayList;
@@ -1715,9 +1716,7 @@
 		if (lastDotOffset == -1) {
 			return sourceName;
 		}
-		char fileSeparator = System.getProperty("file.separator").charAt(0); //$NON-NLS-1$
-		return name.substring(0, lastDotOffset).replace('.', fileSeparator)
-				+ fileSeparator + sourceName;
+		return name.substring(0, lastDotOffset).replace('.', File.separatorChar) + File.separatorChar + sourceName;
 	}
 
 	/**
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java
index 1e87757..ea9c3cb 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java
@@ -15,6 +15,7 @@
  *******************************************************************************/
 package org.eclipse.jdi.internal.connect;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.net.ServerSocket;
@@ -184,8 +185,7 @@
 		String address = listenConnector.startListening(args);
 
 		// String for Executable.
-		String slash = System.getProperty("file.separator"); //$NON-NLS-1$
-		String execString = fHome + slash + "bin" + slash + fLauncher; //$NON-NLS-1$
+		String execString = fHome + File.separatorChar + "bin" + File.separatorChar + fLauncher; //$NON-NLS-1$
 
 		// Add Debug options.
 		execString += " -Xdebug -Xnoagent -Djava.compiler=NONE"; //$NON-NLS-1$