frazman
frazman

Reputation: 33273

how to make jar file from commandline in ubuntu

I am kinda stuck. Usually I use the export option in eclipse to create a jar. But now, i have deployed my code in production and want to create a jar file.

So I have two files,

 foo.java which calls bar.java

And then it uses couple of jars

foobar.jar foo_bar.jar

Now,so main is in foo.java

How do i create an executable jar.

Thanks,

Upvotes: 4

Views: 14117

Answers (1)

Mark T
Mark T

Reputation: 109

Here's a great article on the topic: http://manpages.ubuntu.com/manpages/dapper/man1/jar.kaffe.1.html

Basically:

 $jar cvf classes.jar Foo.class Bar.class

Upvotes: 8

Related Questions