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
Error: Could not find or load main class HelloWorld Caused by: java.lang.NoClassDefFoundError: HelloWorld (wrong name: com/coderunner/javaapp/HelloWorld)
#1129
Describe the bug
Description of what the bug is.
Error: Could not find or load main class HelloWorld
Caused by: java.lang.NoClassDefFoundError: HelloWorld (wrong name: com/coderunner/javaapp/HelloWorld) To Reproduce
Steps to reproduce the behavior:
5. Run using Code Runner Plugin
**Actual behavior**
Description of what happened actually.
[Done] exited with code=1 in 1.711 seconds
[Running] cd "/Users/sri/Downloads/JavaWithPackage/com/coderunner/javaapp/" && javac HelloWorld.java && java -classpath . HelloWorld
Error: Could not find or load main class HelloWorld
Caused by: java.lang.NoClassDefFoundError: HelloWorld (wrong name: com/coderunner/javaapp/HelloWorld)
[Done] exited with code=1 in 0.908 seconds
**Expected behavior**
Description of what you expected to happen.
` /usr/bin/env /Library/Java/JavaVirtualMachines/jdk-20.jdk/Contents/Home/bin/java -XX:+ShowCodeDetailsInExceptionMessages -cp /Users/sri/Library/Application\ Support/Code/User/workspaceStorage/a7914bcef1b1f13f62c5f39661852924/redhat.java/jdt_ws/JavaWithPackage_faceaf5f/bin com.coderunner.javaapp.HelloWorld
/Users/sri/.zshrc:133: command not found: ng
/Users/sri/Downloads/JavaWithPackage $ /usr/bin/env /Library/Java/JavaVirtualMachines/jdk-20.jdk/Contents/Home/bin/java -XX:+ShowCodeDetailsInExceptionMessages -cp /Users/sri/Librar
y/Application\ Support/Code/User/workspaceStorage/a7914bcef1b1f13f62c5f39661852924/redhat.java/jdt_ws/JavaWithPackage_faceaf5f/bin com.coderunner.javaapp.HelloWorld
Hello Code Runner!
/Users/sri/Downloads/JavaWithPackage $
`
**Screenshots**
If applicable, add screenshots to help explain your problem.
![image](https://github.com/formulahendry/vscode-code-runner/assets/2825912/63ecc4ea-8120-450d-ae07-371c592b24dd)
The text was updated successfully, but these errors were encountered:
Describe the bug
Description of what the bug is.
Error: Could not find or load main class HelloWorld
Caused by: java.lang.NoClassDefFoundError: HelloWorld (wrong name: com/coderunner/javaapp/HelloWorld)
To Reproduce
Steps to reproduce the behavior:
package com.coderunner.javaapp;
/**
HelloWorld
*/
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello Code Runner!");
}
}
[Running] cd "/Users/sri/Downloads/JavaWithPackage/com/coderunner/javaapp/" && javac HelloWorld.java && java -classpath . HelloWorld
Error: Could not find or load main class HelloWorld
Caused by: java.lang.NoClassDefFoundError: HelloWorld (wrong name: com/coderunner/javaapp/HelloWorld)
[Done] exited with code=1 in 0.908 seconds
The text was updated successfully, but these errors were encountered: