I want to update a .class file in a jar with a new one. What is the easiest way to do it, especially in the Eclipse IDE?
So the answer to your question is: it is almost impossible. Or you have to extract the source code to eclipse and try to generate another class file with your modifications.
To update Java routine classes: Deploy the new Java class or JAR file to the database server. The CALL SQLJ. REFRESH_CLASSES() statement forces the database manager to load the new class into memory upon the next commit or rollback operation.
This tutorial details how to update a jar file
jar -uf jar-file <optional_folder_structure>/input-file(s)
where 'u' means update.
Do you want to do it automatically or manually? If manually, a JAR file is really just a ZIP file, so you should be able to open it with any ZIP reader. (You may need to change the extension first.) If you want to update the JAR file automatically via Eclipse, you may want to look into Ant support in Eclipse and look at the zip task.
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