Run java code on linux

Solved
rwikus Posted messages 994 Status Member -  
 gigi -
Hello,
I am a beginner in Linux and I would like you to explain step by step how to execute Java code in the terminal, if possible.
Thank you for your help.
Configuration: Linux Firefox 3.5.7

2 answers

gunther91
 
Under the terminal:
to compile the file "javac [the name of the *.java file]"
to execute the file "java [the *.class file that was created]"

there you go :)
5
yg
 
You must include .class; otherwise, it won't work.
0
gigi
 
and what if I have several classes!!?
0
rwikus Posted messages 994 Status Member 56
 
but when I type my Java code in a text file, I name my file "fichier.java" at the beginning or I name it normally and I will add ".java" in the terminal
3