This week's giveaway is in the Cloud/Virtualization forum. We're giving away four copies of Production-Ready Serverless (Operational Best Practices) and have Yan Cui on-line! See this thread for details.
As you know .jar file is combination of one or many class files. So if any of your JAVA file source changed then you need to compile that one NOT the .jar file.
Once you compile the desired java file into .class file then just create the .jar file again.
I have a jar file with a number of .java files in it. I have extracted the .jar file and changed in some files.
I would like to compile all the files in it into class files and save them all with retaining the existing
directory structure in the sources.jar file. Any idea how to do this?
Hitesh Patel Patel
posted 6 years ago
One thing you should understand that JAR file cannot be complied rather it can be created.
So if files within your JAR are changed then you need to compile either on command prompt OR use eclipse / netbeans. Then later just overwrite / create new jar to different location with the same name.
I hope this will help you.
posted 6 years ago
how can i compile this mutiple java files in different subfolders using eclipse or any other easy way. i want to remain existing folder sturcture.
You create a project in Eclipse, add the .java files to the project and build the project. It will even build the jar file for you.
If you don't know how to do any of those parts then you need to read an Eclipse tutorial and/or their help pages. Nobody here is going to tell you how to do something when detailed instructions are readily available on the internet. You need to ShowSomeEffort. If you then have a specific question about any part of the process, people here will be glad to help.
A feeble attempt to tell you about our stuff that makes us money
global solutions you can do in your home or backyard