Skip to content

Commit

Permalink
fix: Generate native interfaces not working on windows
Browse files Browse the repository at this point in the history
See #3756
  • Loading branch information
shannah committed Oct 28, 2023
1 parent c53f629 commit 041c10c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 041c10c

Please sign in to comment.