--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/file/PathFileObject.java 2015-06-23 14:27:30.000000000 +0200 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/file/PathFileObject.java 2015-06-23 14:27:29.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,8 +104,8 @@ return new PathFileObject(fileManager, path) { @Override public String inferBinaryName(Iterable paths) { - // use subpath to ignore the leading component containing the module name - return toBinaryName(path.subpath(1, path.getNameCount())); + // use subpath to ignore the leading /modules/MODULE-NAME + return toBinaryName(path.subpath(2, path.getNameCount())); } }; }