[Noob] compiling java projects using the terminal

Hi I’ve been a avid browser on this forum for a while now but never posted anything, but I’ve just hit a stump, having only ever used Eclipse for my Java endeavors i never learned how to compile and run something using the terminal (being self taught and all) now that lack of knowledge has come back to bite me in the butt :clue: . I’m having trouble figuring out how to compile a 3D java example for the libGDX library;
I have downloaded a 3D roguelike example from java2’s
http://www.java2s.com/Open-Source/Java_Free_Code/libgdx/Download_3_DRoguelike_Free_Java_Code.htm
I have the folder but I’m not sure how to compile it and run it (if it is even possible). If anyone can tell be how to do
so it would be much appreciated. FWI I’m using a Mac.

On a side note this being my post if any well experienced JGO member can give a run down on how everything works here that would be great eg any lingo, tags etc.

Thanks in advance :slight_smile: Soltex

Well, first off, you’d have to have the JDK installed. This gives you access to some stuff like the jar tool, appletviewer, but that’s not important. So, first you’ll have to set the class path. Have the libgdx/required libraries in the same directory as the downloaded source, open the terminal (cmd), cd down to the directory you stored the source and jar, and type this: “javac -classpath libgdx.jar;;” , replacing what’s in the <> with possible other resources (sounds, images, etc). This should do it. There’s only one thing it could be, which is that instead of using “javac -classpath libgdx.jar;;” , replace the javac with just java.

Hope this helps,
DarkCart

the linked source did not come with a libGDX jar file. ???

Look here: http://libgdx.badlogicgames.com/download.html