Hi friends,
Today, We had some trouble in using the .class file in java project. My colleague gave an idea of creating the .class to .jar file. So, We have created the .class file to .jar file, which solved our problem.
But one should know the package name of the .class file before creating the .jar file.
If the .class file is in some abc package. We have to place the .class file in a folder named abc.
In command prompt/terminal, go to the parent folder of abc.
Syntax:
jar cf jar_file_name dir\{classname(s),*}
Example:
cmd> jar cf abc.jar abc\*
All the classes from abc folder will be now in abc.jar file
Now you can import the .jar file in any java project.
Showing posts with label .jar. Create. Show all posts
Showing posts with label .jar. Create. Show all posts
Subscribe to:
Posts (Atom)
Featured Post
Java Introdcution
Please send your review and feedback to psrdotcom@gmail.com
-
Hi all, I spent 2 days on configuring this. I read lot of blogs and instrutction steps from various sites. I would like share my experienc...
-
Hi folks, Today we will see how we can get the folder path of the windows user specific app data for storing any program (app) based inform...
-
For the academic purpose i had written a small program in Matlab. I have tried encoding and decoding the image by using Huffman coding. ...