Skip to content

Commit

Permalink
Merge pull request #100 from meituan/bugfix/windows_jar_fix
Browse files Browse the repository at this point in the history
[feat]  windows 上jar input 问题修复
  • Loading branch information
jzj1993 authored Jun 7, 2021
2 parents 3d8577e + 7f61f88 commit d5dd24c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
public class ClassUtils {

public static String path2Classname(String entryName) {
return entryName.replace(".class", "").replace(File.separator, ".");
// 感谢大佬 dingshaoran
//ClassUtils.path2Classname(className); File.separator donot match jar entryName on windows
return entryName.replace(".class", "")
.replace('\\', '.')
.replace('/', '.');
}

public static boolean checkClassName(String className) {
Expand Down

0 comments on commit d5dd24c

Please sign in to comment.