Kompilimi, ekzekutimi i nje programi JAVA.
Skedari ne te cilin do te shkruajme programin duhet te ruhet me prapashtesen .java (emri_klases.java)
Per te kompiluar nje program perdoret instruksioni:
javac EmriSkedarit.java
Nese shfaqet mesazhi:
'javac' is not recognized as an internal or external command,
operable program or batch file.
atehere kopjo adresen e javac aty ku eshte instaluar programi Java
psh:
C:\Program Files (x86)\Java\jdk1.7.0_02\bin
dhe me pas tek Control Panel -> System-> Advanced System Settings ->
Advanced -> Environment Variables -> System Variables:
Path: ;C:\Program Files (x86)\Java\jdk1.7.0_02\bin
Nese ka adresa te tjera ato ndahen me pikepresje.
Kurse per ta ekzekutuar perdoret instruksioni:
java EmriSkedarit
P.sh:
D:\>javac first.java
D:\>java First
Error: Could not find or load main class First
D:\>java -cp . First
First Java application
Ne qofte se ne modifikojme programin duhet ta ruajme ate , ta rikompilojme dhe me pas ta ekzekutojme.