diff --git a/transpiler/java/com/google/j2cl/generator/OutputGeneratorStage.java b/transpiler/java/com/google/j2cl/generator/OutputGeneratorStage.java index e04595dfa0..8498279d90 100644 --- a/transpiler/java/com/google/j2cl/generator/OutputGeneratorStage.java +++ b/transpiler/java/com/google/j2cl/generator/OutputGeneratorStage.java @@ -279,13 +279,13 @@ private static String getRelativePath(Type type) { TypeDeclaration typeDeclaration = type.getDeclaration(); String typeName = typeDeclaration.getSimpleBinaryName(); String packageName = typeDeclaration.getPackageName(); - return packageName.replace(".", File.separator) + File.separator + typeName; + return packageName.replace(".", "/") + '/' + typeName; } /** Returns the absolute binary path for a given type. */ private static String getAbsolutePath(CompilationUnit compilationUnit, Type type) { TypeDeclaration typeDeclaration = type.getDeclaration(); String typeName = typeDeclaration.getSimpleBinaryName(); - return compilationUnit.getDirectoryPath() + File.separator + typeName; + return compilationUnit.getDirectoryPath() + '/' + typeName; } }