I would like to attach the jdk src.zip to a module (it would actually be nicer to do this at a global level for IDEA) and I am not sure if I am doing it right. I have unzipped the src into a folder and added it as an additional source root. This works great for browsing jdk sources but whenever I try to run my application, Intellij has to parse ALL of the JDK sources again. This takes about 30 seconds.

Please tell me there is a better way to do this.

Thanks,

Tony

Votes

0

Share

Ok, I figured it out. In the Project view under libraries it will show the JDK. I click on jump to source and at the configuration screen for the JDK's there is an option to change the source path. Whew.

What do you really want to achieve?If you set up a JDK the regular way (project settings, JDK), IDEA automatically attaches the zipped source.You can browse and navigate the sources that way just fine.

I would like to attach the jdk src.zip to a module (it would actuallybe nicer to do this at a global level for IDEA) and I am not sure if Iam doing it right. I have unzipped the src into a folder and added itas an additional source root. This works great for browsing jdksources but whenever I try to run my application, Intellij has toparse ALL of the JDK sources again. This takes about 30 seconds.

Go to Project Structure dialog, select the "JDKs" node, select your JDK, select the "Sourcepath" tab, press the "Add" button and select src.zip (it's actually added there by default, so I'm not sure why it wasn't picked up automatically for you). You don't need to unpack the archive or add it as a source root.