0

Is it possible to update the files inside a jar file using copy/paste in windows explorer? We have a windows service that was written in java and is over 10 years old. We recently updated our version of oracle on the database side and service began failing. The issue is in the way we are making a connection to the database. The old version, which is deployed with the code, makes connections using the thin client and is formatted using host:port:sid. I believe with the new versions of oracle they moved away from using sid and instead use service name using the format host:port:/servicename. If i were to say download newer jdbc drivers could I save this as a zip file, go in and copy all the files and then go back to my older version of oracle (9i) thats deployed with the code, save that as a zip, extract, paste the files from the new drivers, zip it, and save it back to a jar? I would just update the version of oracle deployed with our code but this was written before they used source control and I did find source code but can't be certain that what I found is specifically what is running on the server. So updating the version in the project will be difficult.

EDIT: I guess my main question is the possibility of doing this through windows explorer and changing the extension from jar to zip and using windows to zip/unzip the files and change the zip file back to a jar? I've seen lots of examples how to do this through the jar tool. Does this mean you can't do it through windows explorer? I tried doing this and now I get an error, NoClassDefFoundError.

  • You have to decompile the jar file. Then edit as per requirement. Then again compile and build a new jar. You can use any java IDE for it. I will prefer eclipse. Take a look at the below question. [Decompile Jar][1] [1]: http://stackoverflow.com/questions/647116/how-to-decompile-a-whole-jar-file – Arijit Sep 12 '16 at 17:06
  • So I must use a special tool to decompile and use the jar tool or use a jave IDE? I can't use windows explorer and just change the extension from jar to zip? And I can't use windows explorer to copy and paste files into the extracted zip jar file? I must use the jar tool or java IDE? – Nighttrain5150 Sep 12 '16 at 17:49

0 Answers0