formulahendry / formulahendry/vscode-code-runner

[Bug] CodeRunner Can't run .java files on Mac

Aperta
#720 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
2.4k
Fork
351
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

- 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Riproduci il problema dall’azione Run del clic destro di VS Code usando .vscode/launch.json, .vscode/settings.json e QuickTest.java. Inizia con il comando `cd`, `javac` e `java` riportato e verifica la directory di lavoro e la posizione del file; l’attività è completata quando l’esecuzione di QuickTest.java visualizza `im testing this`.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, vscode
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.