Bug 509354 - Java 9 Oxygen Plugin Fails

Change-Id: I40395759aa817867a8939ec2803f64e91043be30
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
index 733d68a..8beec9d 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
@@ -445,8 +445,14 @@
 				if (lib.exists() && lib.isFile()) {
 					sourceRootPath = getDefaultSystemLibrarySource(lib); // To attach source if available
 				}
-				LibraryLocation libraryLocation = new LibraryLocation(
-						new Path(installLocation.getAbsolutePath()).append("jrt-fs.jar"), //$NON-NLS-1$
+				IPath pathName = new Path(installLocation.getAbsolutePath()).append("lib").append("jrt-fs.jar"); //$NON-NLS-1$ //$NON-NLS-2$
+				// From Java 9 149 version, we see that jrt-fs.jar is moved to lib directory so we need to look at both places
+				File jrtfsJar = pathName.toFile();
+				if (!jrtfsJar.exists()) {
+					pathName = new Path(installLocation.getAbsolutePath()).append("jrt-fs.jar"); //$NON-NLS-1$
+				}
+				 
+				LibraryLocation libraryLocation = new LibraryLocation(pathName,
 						sourceRootPath, getDefaultPackageRootPath(),
 						getDefaultJavadocLocation(installLocation));
 				allLibs.add(libraryLocation);