Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-07-2011, 04:49 AM   #1
Registered: Apr 2010
Posts: 51

Rep: Reputation: 2
how to convert java class into jar archive in linux (Redhat)

Hello Friends
I need to know that how to convert a java class file into java archive (jar) .Please answer.
Rahul Sharma
Old 06-07-2011, 07:37 AM   #2
Senior Member
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
It should be as simple as:

jar cvf myJarFile.jar *.class
This assumes you're in the directory with all the .class files you want. If not, you can just replace '*.class' with a list of the .class files you want to put into your .jar file.

Hope this helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Start jar file from java without being in class path at compile time nazzouri Linux - Newbie 0 02-04-2010 11:47 AM
How to set mail.jar(JavaMail) and mysql-connector-java.jar in Linux class path Terry56 Linux - Software 3 01-19-2010 10:06 AM
KDE jar MIME is application/zip and not application/java-archive in Ubuntu Intrepid? arobinson74 Linux - Software 2 09-18-2009 12:40 PM
Fedora Core 1 Associating .jar files with java -jar command pymehta Fedora 0 01-13-2005 06:26 AM
Compile Java - .class, .java, .jar ? woranl Programming 2 11-09-2004 11:12 PM

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration