formulahendry / formulahendry/vscode-code-runner
[Bug] CodeRunner Can't run .java files on Mac
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
- VS Code Version: 1.52.1
- OS Version: OS Catalina
- Code Runner Version: 0.11.2
**Describe the bug**
I am unable to run a simple java class using coderunner.
**To Reproduce**
Steps to reproduce the behavior:
1. java_projects > .vscode
> QuickTest.java
2. Inside .vscode, i have two files, launch.json and settings.json, these are their values:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "Launch QuickStart",
"request": "launch",
"mainClass": "QuickStart",
"projectName": "java_projects_3c514779"
}
]
}
settings.json file
{
"code-runner.clearPreviousOutput": true,
"code-runner.saveAllFilesBeforeRun": true,
"code-runner.ignoreSelection": true,
"code-runner.fileDirectoryAsCwd": false,
"java.configuration.updateBuildConfiguration": "automatic"
}
contents of QuickTest.java:
//testing vscode
public class QuickTest{
public static void main(String[] args){
System.out.println("im testing this");
}}
**Actual behavior**
After right clicking on the file and clicking run, i get the following message:
cd "/Users/raj/Documents/qr/Home/java_projects/" && javac QuickTest.java && java QuickTest
error: file not found: QuickTest.java
Usage: javac
use --help for a list of possible options
**Expected behavior**
output to screen "im testing this"
**Screenshots**
If applicable, add screenshots to help explain your problem.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.