DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Tools
  4. End-to-End Raspberry Pi with NetBeans IDE 8

End-to-End Raspberry Pi with NetBeans IDE 8

Jose Pereda user avatar by
Jose Pereda
·
Jan. 22, 14 · Interview
Like (1)
Save
Tweet
Share
25.24K Views

Join the DZone community and get the full member experience.

Join For Free

In preparation for the talk G-Force! Self-Powering Global Sensor Nets for IoT that Mark Heckler (@MkHeck) and I will give in a few days in the IoT track of JFokus 2014, we’ve been using the brand new beta version of NetBeans IDE 8 to deploy, debug, and run two of the three different projects required. We use three different Raspberry Pis for three different tasks:

  • Pi “Remote”, in the backend, with a Java SE project

  • Pi “Master”, the server, with GlassFish 4.0 (Web Profile).

  • Pi “Client”, the client, with a JavaFX (SE) project

The communications between the three of them is done via WebSocket. In the backend, the Pi gathers readings from several sensors installed via serial port and also controls a few connected devices. In the client, the user can see values in real time, charts with data for a selected period of time, or command the devices.

Here are two pics of our systems. The first one is the backend in Mark’s shed, where all the sensors are powered with renewable energy coming from a small wind turbine and three small solar panels.


The second is my own setup, with the three Raspberry Pis on my table, just when I’m deploying a JavaFX client from my laptop to the Pi on the left, which is connected to the monitor. The server is embedded in a Lego case to hold a Pi camera, and the third one has an XBee antenna to wirelessly connect to the Arduino on the right.


Except for the server, for the other two SE projects, the new capability of NetBeans IDE 8.0 beta that allows you to select a Remote Java Standard Edition platform comes in really handy, as it greatly simplifies the process of deployment and debugging on the Pis.


You just need to provide the IP address, username, password and the JRE/JDK path of the Pi (on the LAN, with SSH enabled).


After that, simply go to Properties->Run, select the Remote platform, and add a configuration file (providing a name for it), and you’ll be able to run your project on the Pi. If you want, you can run it locally too, just by selecting the default configuration file (Run, Set Project Configuration).


NetBeans will take care of sending the dist folder with the jar and its dependencies to a folder on the Pi (by default /home/pi/NetBeansProjects/<project’s name>), running and even debugging it remotely as if you were running the project on your own computer, with all the console messages in your output windows. You just have to keep in mind that you’re on the tiny Pi.


Once again, kudos to the NetBeans Team!

Integrated development environment NetBeans raspberry pi

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Bye-Bye, Regular Dev [Comic]
  • 5 Factors When Selecting a Database
  • Top 5 Java REST API Frameworks
  • PHP vs React

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: