How to use correct java sources while debugging remote?
已回答
I need to debug some code remotely. Unfortunately on the remote machine another java version is installed compared to my developing PC.
How is it possible to use the correct java sources during debugging? I have them available but don't know how to tell the IDE to use them (except replacing the src.zip in the local java installation which is no good idea).
请先登录再写评论。
You can define what Java version to use in Project's settings: https://i.imgur.com/ZPD1ARU.png
You can add new one if needed under "Edit" button. More info here:
https://www.jetbrains.com/help/idea/sdk.html#jdk
Thanks for your answer, but this is not directly what i wanted to do.
This version is only needed for (final) remote debbugging, for developing I am not allowed to use this version. So I hoped that there is a possibility to choose other sources only while debuggin (similarly to what is offered when the compiled class doedn't match to the sources in other cases). This would avoid changing the JDK version often (between building and debugging).
My company doesn't allow me to install the JDK version on my developing PC which is installed on the remote machine. Additionally, the "Download JDK" doesn't allow me to install the exact version (in my case only the newest 1.8.0 version is offered). I agree it ould be better to use a newer version but unfortunately this is no option.
It is not possible to use different JDK versions for debugging and developing except changing it every time when you need to debug your program.