formulahendry / formulahendry/vscode-code-runner
[Bug] CodeRunner Can't run .java files on Mac
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.4k
- Forks
- 351
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
- 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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Reproduce el problema desde la acción Run del menú contextual de VS Code usando .vscode/launch.json, .vscode/settings.json y QuickTest.java. Empieza con el comando `cd`, `javac` y `java` indicado, y verifica el directorio de trabajo y la ubicación del archivo; se considera terminado cuando ejecutar QuickTest.java muestra `im testing this`.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, vscode
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100