langtools/make/tools/propertiesparser/gen/ClassGenerator.java
changeset 28801 2f1c998c3fcc
parent 28588 16eda7aedf89
--- a/langtools/make/tools/propertiesparser/gen/ClassGenerator.java	Mon Feb 02 18:52:16 2015 +0530
+++ b/langtools/make/tools/propertiesparser/gen/ClassGenerator.java	Mon Feb 02 21:53:36 2015 +0100
@@ -192,8 +192,8 @@
      */
     String packageName(File file) {
         String path = file.getAbsolutePath();
-        int begin = path.indexOf("com" + File.separatorChar);
-        String packagePath = path.substring(begin, path.lastIndexOf(File.separatorChar));
+        int begin = path.lastIndexOf(File.separatorChar + "com" + File.separatorChar);
+        String packagePath = path.substring(begin + 1, path.lastIndexOf(File.separatorChar));
         String packageName =  packagePath.replace(File.separatorChar, '.');
         return packageName;
     }