• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Running *.java files

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

donciakas

Member
Joined
May 3, 2005
Location
Lithuania
:welcome:
i've installed j2re1.4 [java runtime enviroment] and need to start some programs [actualy i have pack of java files, which was created to run on win. but i think there is posibility to run on linux os. any ideas?
 
Java programs run inside a virtual machine and so are platform independant, so even though it was compiled on Windows it should run without problems on Linux.

*.java files contain java source code and must be compiled to byte code before they can be executed. This can be done using "javac <file to compile>. The .class file(s) produced can then be run with the command "java <class file>" or if the java files have been packaged into a java archive (jar) "java -jar <jar file>".
 
Back