Setup Remote Development for Java or C++ using NetBeans

There are a few great options for remote development. Either Eclipse or NetBeans is at the top of the list. This is about NetBeans, and I’ll show you how to set it up.

Install the Java SE Development Kit 8 first. **Note: I had to download the Windows x86. NetBeans was complaining there was no JDK when I installed the 64bit Development Kit

Figure 1: Download Windows x86 JDK 8

If you want to compile C/C++ code, install MinGW. Make sure you select: mingw32-base, ming32-gcc, and msys-base. Click on Installation->Apply Changes

Figure 2: MinGW Installer

Go to https://netbeans.org/ and download Java SE, or Download All if you want C/C++ as well

Figure 3: NetBeans Download

Startup NetBeans then setup the Remote Platform. Click on Tools->Java Platforms

Figure 4: Add Remote Java Platform

Click on the Add Platform… then select Remote Java Standard Edition, then click Next

Figure 5: Remote Java SE

I have installed the Apple Bonjour Service. If you don’t have it installed, enter the IP address for the Host: something like 192.168.110 otherwise enter the following, and click Finish

Figure 6: Connect to Raspberry Pi

Click on File->New Project->Java->Java Application then click Next, then
type a project name and then Click Finish.

Figure 7: New Java Project

Right click the name of the project you just created and select Properties. Click on the Run category, then click on New Configuration. You will need to change the Runtime Platform to raspberrypi, then click Finish

Figure 8: Change to Remote Platform

To setup a remote C/C++ host click on the Services tab on the left, then right click C/C++ Build Hosts

Again I’m making use of the Apple Bonjour Service and can type in “raspberrypi.local for my hostname. If you don’t have the service just type in your Pi’s IP. Something like 192.168.110. Click Next and it will automatically check your connection

The next dialog asked for you login, username is pi unless you’ve changed it, and select password. Make sure the box “Automatically find compilers” is checked. Another dialog will ask you for your password, click OK, then click Finish

To create a new C++ project, right-click on the newly created remote host pi@raspberrypi.local, and make a New C/C++ Project

Make sure the build host is pi@raspberrypi.local and not localhost, then click Finish

Once the project loads, click on Run Project (green arrow) to test

That is everything you need to start compiling Java, and C++ remotely on your Raspberry Pi. Hope this helps

Leave a Reply

Your email address will not be published. Required fields are marked *