Skip to content

Compile Java on command line and Include packages

6. September 2013

As I’m getting more and more a friend of pure commandline programming, I tried to compile a Java-file directly!
But this file has references to external classes, provided in *.jar files! What made me struggling a little bit!

Like always…Googling that helped a lot to find the answer!

So that’s the trick:

javac -cp '.:package_1.jar:package_2.jar'

Notice: That works only on Linux systems

From → tutorial

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: