Problem description: upload the java file on the machine to linux,
javac Test.java
ls
Test.class Test.java
But java Test has an error and the file cannot be found
java Test
Error: Could not find or load main class Test
Environment variables can determine no problem
Environment Variables View
How to solve?
Open the Test.java file and find that it starts with package test;! ! ! !
Just log out
//package test;