Installing a C++/Java IDE on Your Own PC

Steven J. Zeil

Last modified: Jan 23, 2023
Contents:

This document will walk you through the process of installing an IDE (Integrated Development Environment) on your PC that will help you to work with a C++ and/or Java compiler.

All software covered in this document is free.

1 Making Choices

1.1 What Style of Development Do You Want to Do?

There are three major styles of development environment to consider.

1.1.1 Local Development

In this style, you install an IDE, compiler, and debugger on your own (local) PC and to do all your work there.

Advantages:

Disadvantages:

If you want to go with local development but don’t like the choices available to your PC’s operating system, another option is to run a virtual machine on your PC. This virtual “guest” will usually run Linux, making any Linux-compatible tools available to you.

1.1.2 Remote Display

In remote display development, we run the IDE, compiler, & debugger on a remote machine (e.g. the CS Linux servers) and have the results displayed on our local PC’s screen using X2Go.

CS252 was devoted to teaching you how to do this with the Dept’s Linux servers.

Advantages:

Disdvantages:

1.1.3 Remote Development

Remote development strikes a middle point between the extremes of running everything on your PC or running everything on the remote machine.

The compiler and debugger are run on the remote machine and do not need to be installed on your own PC.

The IDE, however, is installed and run on your own PC. It communicates with the remote machine via a combination of SSH and SFTP show you your files on the remote machine, let you edit them, and to issue commands to the compiler and debugger on the remote machine.

Advantages:

Disadvantages:

1.2 What IDE Do You Want?

You can get by without an IDE at all. Tools like emacs and vim are near-IDEs. For that matter, you can get by with any text editor and a command line shell (e.g., NotePad and CMD on Windows). But why would you want to?

You may have gotten used to working with Code::Blocks as an IDE in CS150 and CS250, but you were probably directed to this page from a more advanced course in which, typically, Code::Blocks is insufficient.

There are two IDEs that I recommend at present.

I’ve worked with Eclipse for several years on a daily basis, both for programming and other development tasks, including managing the documents that make up my course websites. More recently, I find myself using VSCode for most work, using Eclipse only for projects that mix together multiple programming languages, something that VSCode does not, in my opinion, support as well.

The choices you have and the process to follow will depend on what operating system your PC is running:

2 Recommended Configurations

2.1 If Your PC runs Windows 10

Windows 10 users have the interesting option of the Windows Subsystem for Linux (WSL), a.k.a., “Bash in Windows”. This is a Linux virtual machine that runs in parallel with your regular Windows operating system but can interact directly with files on your Windows drives and even launch selected Windows programs from the Linux command line. For C++ programming, this is probably the most straightforward way to get a good development environment on a Windows machine. Java programmers are less likely to want to go that route, sticking instead with a native Windows Java compiler.

Local Development Remote Development Remote Display
Java C++
compiler to install Windows Java g++ (in WSL) (none) (none)
IDE to install Eclipse or VSCode VSCode VSCode (none)
Other software to install (none) WSL OpenSSH X2Go
load on local CPU high high low medium
load on network none minimal low high
instructions Eclipse, VSCode here here (CS252) here (CS252)

2.2 If your PC runs Linux

Most Linux distributions will support installing Java, g++, gdb, and make as part of their normal software installation process. Do what you normally do to install any new software package.

For Ubuntu and other Debian-based Linux distributions, you can follow the instructions starting in section 4 here.

2.3 If Your PC runs MacOS (formerly OS/X)

Your options are slightly constrained here compared to Windows. Eclipse does not work, as of when I am writing this, with the MacOS debugger, making it unsuitable for use in C++ development. You could use Eclipse if you were only interested in Java, but this limitation is enough to drop it from my recommended configurations.

VSCode, on the other hand, will work with the MacOS debugger.

Local Development Remote Development Remote Display
compiler to install g++, Java (none) (none)
IDE to install VSCode VSCode (none)
Other software to install (none) (none) XQuartz, X2Go
load on local CPU high low medium
load on network none low high
instructions here here (CS252) here (CS252)

Mac users also have the option of using Apple’s own XCode as an IDE, but be warned: this is quite large (about 8Gig). It also does not offer direct support for remote development.