Details: Java app on GKE : Kubernetes
I am able to debug all the java files of my executable jar but not the inner jars/libraries. My executable jar's main code is in implementaion jars/libraries, I have source code of those libraries. How can I debug them?
I have used gcr.io/google-appengine/openjdk
and added following entry points:
ENTRYPOINT ["java","-agentpath:/opt/cdbg/cdbg_java_agent.so", "-Djava.security.egd=file:/dev/./urandom" ,"-Dcom.google.cdbg.module=watchlist", "-Dcom.google.cdbg.version=develop","-jar","/watchlist.jar"]
I think I need a way to put all the class files of required library jars in my main executable jar's web-inf/classes folder. How can I do that?
TIA
I recommend using an IDE.
In my experience, when you got the implementation from your java file to the class file (CTRL + click normally does the trick for classes or Right click and go to implementation for implementation), you reach the class file of the jar.
There you can go to the top of the class file and click on the package. This will open the jar from target of your project explorer. You will be able to find your desired class there, or in a different package.
I hope this approach works for you.
PS: I use Intellij