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.
Subscribe to:
Post Comments (Atom)
Featured Post
Java Introdcution
Please send your review and feedback to psrdotcom@gmail.com
-
Hi all, Today, I'll explain how to uninstall completely the openjdk from the RedHat Enterprise Linux (RHEL) machine. Some of the sof...
-
Hi folks, Today we are going to see, how we can run or deploy the Go (Golang) project in IIS. Development Create your Golang project with w...
-
Hi friends, I have updated my Aadhaar details from Aadhaar update center. It is mentioned that within 72 hours, my details will be update...
2 comments:
Hi Parks,
Thanks for visiting my blog. You will get lot of free videos online for Java. No need to spend money on online tutorials. Scope of java training is not limited. You will be learning new topics when they are required by you. Please follow the Complete Reference and J2EE for Dummies, Deitel and Deitel, Head first Java to get a better idea of the topics and examples.
I actually enjoyed reading through this posting.Many thanks.
Java Training Courses
Post a Comment