Skip to content

Commit 2d479e6

Browse files
Fix the validation issue for main class name (#238)
Signed-off-by: Jinbo Wang <[email protected]>
1 parent d3fdbdf commit 2d479e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveMainClassHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444

4545
public class ResolveMainClassHandler {
4646
private static final Logger logger = Logger.getLogger(Configuration.LOGGER_NAME);
47-
private static final String CLASSNAME_REGX = "([$\\w]+\\.)*[$\\w]+";
47+
// Java command line supports two kinds of main class format: <mainclass> and <module>[/<mainclass>]
48+
private static final String CLASSNAME_REGX = "([$\\w]+\\.)*[$\\w]+(/([$\\w]+\\.)*[$\\w]+)?";
4849

4950
/**
5051
* resolve main class and project name.

0 commit comments

Comments
 (0)