formulahendry / formulahendry/vscode-code-runner
$fileName and $fileNameWithoutExt returns lowercase name when compiling java file causing the main class to not be found.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
When the main file name has capital letter and try to compile it throws this: Error: Could not find or load main class {fileName}
This is because:
> javac {fileName} // don't need to match case
>java {fileName} // throws an error if case doesn't match
But sometimes if I change file name and re-run, $fileName and $fileNameWithoutExt return the correct case format and the file run without any issue. So, my workaround is to change the main file name/class back and forth to get it to work.
Tried other method like cleaning up java language server workspace and reload but it doesn't work.
It's running on windows.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.