Getting Started with XAMPP on Ubuntu - A Step-by-Step Guide for Beginners
A Beginner’s Guide to Installing XAMPP on Ubuntu or Debian-Based Distros
Read MorePublished on Sep 05, 2023 by XAPHNE on IntelliJ, JDK, Ubuntu, Linux, Debian, Environment Variables
Setting up IntelliJ IDEA IDE and JDK on Ubuntu or other Debian based distributions
IntelliJ IDEA is a popular integrated development environment (IDE) for Java development. It offers a wide range of features to streamline the development process and enhance productivity. To get started with IntelliJ IDEA, you’ll first need to install the IDE and set up the Java Development Kit (JDK). In this blog post, we’ll walk you through the process of installing IntelliJ IDEA, downloading the JDK from within IntelliJ IDEA, and setting up Java environment variables on an Ubuntu system.
Download IntelliJ IDEA: Go to the JetBrains website and download the Community or Ultimate edition of IntelliJ IDEA, depending on your requirements. You can also use the Flatpak package manager to install IntelliJ IDEA if you prefer.
Install IntelliJ IDEA via Flatpak (recomended): If you choose to use Flatpak, open your terminal and run the following command:
sudo flatpak install flathub com.jetbrains.IntelliJ-IDEA-Community
This command will install the Community edition. Replace IntelliJ-IDEA-Community
with IntelliJ-IDEA-Ultimate
if you want to install the Ultimate edition.
Launch IntelliJ IDEA: Once the installation is complete, you can launch IntelliJ IDEA from the Applications menu or by running flatpak run com.jetbrains.IntelliJ-IDEA-Community
in the terminal.
Open IntelliJ IDEA: Launch IntelliJ IDEA.
Create a New Project: Click on “Create New Project” or open an existing project if you have one.
Configure Project SDK: If you haven’t configured a JDK yet, you’ll see a message saying “Project SDK is not defined.” Click on the “New Project” button next to it.
Add JDK: In the “Project SDK” dialog, select “Download JDK…” to download a JDK directly from JetBrains. You can also choose “Add JDK…” to configure an existing JDK if you have one installed on your system.
Select JDK Version: Choose the version of the JDK you want to download or configure. IntelliJ IDEA will automatically download and set up the selected JDK for your project.
Configure Project Language Level: Set the language level for your project. This determines which language features are available to you. Usually, it’s best to select the latest available version.
Set JAVA_HOME and PATH: To set the JAVA_HOME
and PATH
environment variables, open the terminal and run:
echo '# Setting JAVA_HOME and PATH variables for installed JDK' >> ~/.bashrc
echo 'export JAVA_HOME="~/.jdks/corretto-17.0.8.1/"' >> ~/.bashrc
echo 'export PATH="$JAVA_HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Note: Make sure to change the path according to your jdk directory
This sets the JAVA_HOME
and PATH
variables to the path of the default JDK installation.
Verify Installation: To verify that Java is correctly installed and the environment variable is set, run the following commands:
java --version
javac --version
echo $JAVA_HOME
echo $PATH
You should see information about the installed Java and Java Compiler version and the JAVA_HOME
and PATH
variable’s path.
Setting up IntelliJ IDEA and the JDK on Ubuntu is a straightforward process. With these steps, you’ll have a fully functional Java development environment ready to build your projects. IntelliJ IDEA’s user-friendly interface and powerful features will help streamline your development workflow, making it easier to create Java applications. Happy coding!
A Beginner’s Guide to Installing XAMPP on Ubuntu or Debian-Based Distros
Read MoreSetting up IntelliJ IDEA IDE and JDK on Ubuntu or other Debian based distributions
Read MoreIndia’s Historic Moon Landing: A Triumph of Science and Spirit
Read More