langtools/make/tools/propertiesparser/gen/ClassGenerator.java
changeset 28801 2f1c998c3fcc
parent 28588 16eda7aedf89
equal deleted inserted replaced
28800:35f9042d53b3 28801:2f1c998c3fcc
   190     /**
   190     /**
   191      * Retrieve package part of given file object.
   191      * Retrieve package part of given file object.
   192      */
   192      */
   193     String packageName(File file) {
   193     String packageName(File file) {
   194         String path = file.getAbsolutePath();
   194         String path = file.getAbsolutePath();
   195         int begin = path.indexOf("com" + File.separatorChar);
   195         int begin = path.lastIndexOf(File.separatorChar + "com" + File.separatorChar);
   196         String packagePath = path.substring(begin, path.lastIndexOf(File.separatorChar));
   196         String packagePath = path.substring(begin + 1, path.lastIndexOf(File.separatorChar));
   197         String packageName =  packagePath.replace(File.separatorChar, '.');
   197         String packageName =  packagePath.replace(File.separatorChar, '.');
   198         return packageName;
   198         return packageName;
   199     }
   199     }
   200 
   200 
   201     /**
   201     /**