diff --git a/maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/GenerateNativeInterfaces.java b/maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/GenerateNativeInterfaces.java index 6a85e48717..a5a8ee32a7 100644 --- a/maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/GenerateNativeInterfaces.java +++ b/maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/GenerateNativeInterfaces.java @@ -81,7 +81,10 @@ private void generateNativeInterface(String relativePath) throws Exception { URLClassLoader cl = new URLClassLoader(new URL[]{ new File(project.getBuild().getOutputDirectory()).toURI().toURL(), cn1CoreJar.toURI().toURL()}); - String classPath = relativePath.replace(File.separator, "."); + String classPath = relativePath + .replace("\\", ".") + .replace("/", ".") + .replace(File.separator, "."); classPath = classPath.substring(0, classPath.lastIndexOf(".")); c = cl.loadClass(classPath);