I have this .JAR file. I decompiled it to multiple .java files. There is any way to have a new functional .JAR file, after updating a single .java file and recompiling it? If it is possible how would we recompile this .java file without having it's dependencies? (ie. external libraries)
Of course!
Ask javac to
javac -cp <whatever classpath you have> path/to/YourClass.java
after that you would say
jar uvf yourjar.jar path/to/YourClass*.class
and you're done, your .jar have been updated, now deploy it!
Remember, .jar file is just a zip archive with classes and manifest!
If your java source references any external classes, you'll need them around. But you also need them around for actually using the compiled class, so I guess it's not a huge problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With