How to compile multiple class files in Java on LINUX shell?

Hello I am on campus trying to compile a simple binary tree program .. our campus only has shell and I am using Linux over eclipse..

I have 2 class files in my current directory bintree.java and treetest.java

javac bintree.java treetest.java

this code creates multiple classes but what is my next step? ive searched everywhere theres not a lot of info on java Linux shell. thank you

Answers


If all of the java files you need to compile are in your directory you can

javac *.java 

And then

java NameOfClassWithMainMethod

Otherwise if you want to learn to work without an IDE I would suggest learning to use Maven or Gradle. They will abstract away a lot of the tedium of compiling a project, and if become a pro dev you'll need to know at least Maven anyway.


Need Your Help

How do I set a pointer to an object to Null? C++

c++ pointers null segmentation-fault

I'm working on a roguelike game and I have it set up so that at MOST there will be 3 monsters on a level. So I have 3 pointers to monsters. They all start out as NULL.

Objective C: Background & Frame Issue During Orientation Change

objective-c ios xcode ipad core-graphics

I am having a problem with my background and frame whenever i turn my iPad to landscape,

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.