You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I encountered a strange issue with Code Runner in VSCode when running a Java file named InterLeaveArrays.java. The program only runs correctly when the file name and class name are exactly InterLeaveArrays.java (with uppercase I, L, and A). Any other capitalization or letter combinations (e.g., InterleaveArrays, interLeaveArrays, InterLeavearrays, or InterLeaveARrays) fail to run.
The Code Runner always uses the command "cd "D:\my\file\path" && javac InterLeaveArrays.java && java InterLeaveArrays" for every file name I mentioned. This command generated by Code Runner is quite confusing. I have checked my Code Runner executor map, and there are no issues with it. Additionally, for other valid file names like "LeaveArrays.java" or "InterArrays.java", everything works perfectly.
To Reproduce
Steps to reproduce the behavior:
Create a Java file named interleavearrays.java with the following content
Change the capitalization of the class name and file name (e.g., InterleaveArrays, interLeaveArrays, InterLeaveARrays) and try running it again.
Actual behavior
The command generated by Code Runner is: cd "d:\file\path" && javac InterLeaveArrays.java && java InterLeaveArrays
Expected behavior
The command generated should be like this: cd "d:\file\path" && javac interleavearrays.java && java interleavearrays
The Java file should run successfully regardless of capitalization, as long as the class name matches the file name.
Screenshots
I apologize if my language was unclear. Here is the explanation:
"错误: 找不到或无法加载主类" means “Error: Could not find or load main class”
“原因” means “Cause”
The text was updated successfully, but these errors were encountered:
Describe the bug
I encountered a strange issue with Code Runner in VSCode when running a Java file named InterLeaveArrays.java. The program only runs correctly when the file name and class name are exactly InterLeaveArrays.java (with uppercase I, L, and A). Any other capitalization or letter combinations (e.g., InterleaveArrays, interLeaveArrays, InterLeavearrays, or InterLeaveARrays) fail to run.
The Code Runner always uses the command "cd "D:\my\file\path" && javac InterLeaveArrays.java && java InterLeaveArrays" for every file name I mentioned. This command generated by Code Runner is quite confusing. I have checked my Code Runner executor map, and there are no issues with it. Additionally, for other valid file names like "LeaveArrays.java" or "InterArrays.java", everything works perfectly.
To Reproduce
Steps to reproduce the behavior:
Actual behavior
The command generated by Code Runner is:
cd "d:\file\path" && javac InterLeaveArrays.java && java InterLeaveArrays
Expected behavior
The command generated should be like this:
cd "d:\file\path" && javac interleavearrays.java && java interleavearrays
The Java file should run successfully regardless of capitalization, as long as the class name matches the file name.
Screenshots
I apologize if my language was unclear. Here is the explanation:
"错误: 找不到或无法加载主类" means “Error: Could not find or load main class”
“原因” means “Cause”
The text was updated successfully, but these errors were encountered: