Basic Hello world test: -------- root@mantic:~# apt install openjdk-21-jre-headless .... root@mantic:~# cat << EOF > Test.java public class Test { public static void main(String[] args){ System.out.println("Hello world"); } } EOF java Test.java Hello world
--------
Basic Hello world test: 21-jre- headless
System. out.println( "Hello world");
--------
root@mantic:~# apt install openjdk-
....
root@mantic:~# cat << EOF > Test.java
public class Test {
public static void main(String[] args){
}
}
EOF
java Test.java
Hello world
--------