Videos
java - Where does IntelliJ store the JDKs that it downloads on my behalf? - Stack Overflow
Does IntelliJ installation automatically install Java JDK?
How to setup Java JDK for Intellij (Flatpack)
Which JDK for a new computer? (I know, sorry)
Umm, doesn't IntelliJ come with its own JDK already?
If you're on Linux you can download a version without a jetbrains JDK if you want to use the system's JDK. This will usually be OpenJDK 11 nowadays (or 8 if you're on an older distribution). But I believe Jetbrains made some tweaks to the JDK to improve font rendering or some such so I think it's usually best to use their own JDK that comes with the installation of IDEA
More on reddit.comtl;dr
/Users/your_username_here/Library/Java/JavaVirtualMachines/
Choose File > Project Structure > Platform Settings > SDKs
You can inspect the JDKs known to IntelliJ by choosing File > Project Structure > Platform Settings > SDKs.
Notice how the location of the selected JDK is shown in the JDK home path field.
In this example, the JDK downloaded by IntelliJ was put in:
/Users/your_username_here/Library/Java/JavaVirtualMachines/
Note that this location contrasts with the location used by some of the independent JDK installers. In my experience, those tools use the root /Library path, rather than in the userโs ~/Library. That full path would be: /Library/Java/JavaVirtualMachines.
SDKMAN!
By the way, an alternative tool I prefer for finding, downloading, installing, and uninstalling JDKs (and other software kits like Gradle) is SDKMAN!. It is a command-line tool for Unix-like operating systems including macOS.
It's changing form version to version, but can be easily inspected via:
File > Project Structure > Platform Settings | SDKs
now it's in .jdks subfolder in 2023 :)
I'm prepping a Java programming course that requires IntelliJ Community Edition and where most students will likely have Windows pcs.
I don't typically use Windows & have a question about setup.
Do Windows users need to explicitly install the Java JDK after installing IntelliJ?
If so, is there any preference on variant (Oracle or OpenJDK) and version for working with latest IntelliJ?
Installing JDK
To install JDK, you can refer to help.ubuntu.com/community/Java.
If you want to install openJDK,
sudo apt-get install openjdk-7-jdk
If you want to install Oracle JDK, you can use PPA from webup8 team.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Installing IntelliJ IDEA
[Updated Answer]
Download IntelliJ IDEA CE from www.jetbrains.com/idea/download/.
Extract ideaIC-XX.Y.Z.tar.gz using
tar -zxvf ideaIC-XX.Y.Z.tar.gzRun
idea.shinbindirectory inside the extracted folder.- To create command-line runner,
Tools > Create Command-line Launcher - To create a desktop entry,
Tools > Create Desktop Entry
That's it. Now, you can launch IntelliJ from Ubuntu dash.
[Old Answer]
Download IntelliJ IDEA CE from www.jetbrains.com/idea/download/.
Extract ideaIC-XX.Y.Z.tar.gz using
tar -zxvf ideaIC-XX.Y.Z.tar.gzBecome root.
sudo -iMove the extracted folder to
/opt/ideamv ideaIC-XX.Y.Z /opt/ideaCreate a desktop file and install it:
gedit idea.desktopand copy the following to the
idea.desktopfile.[Desktop Entry] Name=IntelliJ IDEA Type=Application Exec=idea.sh Terminal=false Icon=idea Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=IntelliJ IDEAthen execute the following command to automatically install it in the unity:
desktop-file-install idea.desktopCreate a symlink in
/usr/local/binusingcd /usr/local/bin ln -s /opt/idea/bin/idea.shFor idea icon to be displayed in dash, idea icon can be added as
cp /opt/idea/bin/idea.png /usr/share/pixmaps/idea.png
That's it. Now, you can launch IntelliJ from Ubuntu dash.
This should get you started:
#!/bin/sh
add-apt-repository ppa:webupd8team/java &&
apt-get update &&
apt-get install oracle-java7-installer &&
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections &&
update-java-alternatives -s java-7-oracle &&
wget -O /tmp/intellij.tar.gz http://download.jetbrains.com/idea/ideaIC-12.0.4.tar.gz &&
tar xfz /tmp/intellij.tar.gz &&
cd idea-IC-123.169/bin &&
./idea.sh
Some things you should consider:
- I'm not sure at which part the
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selectionshas to be. Might be a line earlier. - The line
cd idea-IC-123.169/binis dependend on the IntelliJ version, as the extracted folder is named in that way. It only works with the version available while I'm writing this. - Same goes for the download link. It might change with a newer version.
- I'm not sure what happens if you try to add a ppa that already exists again. This could lead to problems.
- You have to execute the script as root