This problem has been solved witht he help of the comments:
It was necessary to recompile the java with the correct target version. In my case javac -source 1.3 -target 1.3 instead of simply javac did the trick.
Problem Description:
I have a compiled .jar java program in which a single url string needs to be modified. Using JD I was able to decompile the code and make the changes.
As I would like to avoid having to recompile the entire project I thought I could simply recompile the single .java file I modified into a .class and replace the original with it.
However, after repackaging the jar, the program does start but the functionality making use of the code I modified behaves erratically.
In the log I find:
E EventDispatchThreadExceptionHandler:Unhandled exception occurred during event dispatching.::
java.util.MissingResourceException: Can't find bundle for base name com.myCompany.mySoftware.resources.ModuleResources, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:842)
ModuleResources.java is the file I modified...
Analysis of the problem:
I decompiled the repackaged jar file and compared it with the decompilation of the original jar file: In the file I modified (at least) the code seems to be identical BUT JD shows different line numbers. Could that hint at the problem?
Any help would be greatly appreciated.
Many thanks!
This is the old question.
Nowadays, I found the good method to decompile and repack the jar file.
Here is the good document.
https://www.talksinfo.com/how-to-edit-class-file-from-a-jar/
I recommend the third method in the document.!!!
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