• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

* Welcome Frank DelPorte

 
Marshal
Posts: 5792
368
IntelliJ IDE Python TypeScript Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This week, we're delighted to have Frank DelPorte helping to answer questions about the new book Getting started with Java on the Raspberry Pi.


The promotion starts Tuesday, September 26th, 2023 and will end on Friday, September 29th, 2023

We'll be selecting four random posters in this forum to win a free copy of the book provided by the publisher, Lean Publishing.


Image from https://d2sofvawe08yqg.cloudfront.net

Please see the Book Promotion page to ensure your best chances at winning!

Posts in this welcome thread are not eligible for the drawing, and should be reserved for welcoming the author. Questions posted in this topic are subject to removal.
 
Marshal
Posts: 80222
424
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome I hope you get lots of awkward interesting questions.
 
Greenhorn
Posts: 7
IntelliJ IDE Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank,

Is there a way to run Java on the Raspberry Pico?

I'm planning on using a Pico to get temperature readings and send them to a Raspberry Pi 4 which will store the readings in a database. Am I restricted to working with Micro Python or another low level language?

Thanks,

Jacques
 
Author
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for having my book here!

@Campbell Ritchie: I don't mind any kind of questions ;-)

@Jacques Navarro: The Pico is comparable to a Arduino, so it's a microcontroller. Java runs everywhere, as long as it's a "full computer", so yes on a Raspberry Pi, but not on a Pico. I heard rumours of attempts to compile Java code to microcontroller instructions, but I don't think that's a valuable option (at this moment).
 
Rancher
Posts: 508
15
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank - I've yet to venture into the world of Pi, but I'm seriously considering it; I'm getting to the age when I'm starting to think of things I can do when I retire (I'm 58)

So can you tell me what sort of spec I would need to look for in a new Pi to develop Java apps, using a decent IDE, without running out of CPU/memory/etc.?

Cheers
John
 
Jacques Navarro
Greenhorn
Posts: 7
IntelliJ IDE Java Ubuntu
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Matthews wrote:
So can you tell me what sort of spec I would need to look for in a new Pi to develop Java apps, using a decent IDE, without running out of CPU/memory/etc.?



John,

You don't have to max out specs in order to develop on Pis. There are remote development options which allow you to write your code using the resources of one machine while saving the code to another.

VS Code lets you do this using a SSH connection to a target machine. I've used this to write code from my main computer to a Raspberry Pi 4 that runs Ubuntu Server 20.04 LTS. You just need to set up the sshd on the Pi to accept connections. You then connect to the Pi via VS Code and start coding.

https://code.visualstudio.com/docs/remote/remote-overview

IntelliJ has a similar solution but with limitations. I believe you need to have an Ultimate subscription. They only support connecting to Ubuntu, Debian, CentOS and RHEL. I don't know if you can connect to Raspberry Pi OS.

https://www.jetbrains.com/help/idea/remote-development-starting-page.html

One work around that I've used is developing locally with IntelliJ Community Edition and then sending the file directly with scp


https://www.ssh.com/academy/ssh/scp

Another method is to push your project to Github and then clone it down to the Pi using a ssh connection.
 
Frank Delporte
Author
Posts: 22
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@John, correct what @Jacques is saying! I also prefer to work on PC and upload to RPi to run and test.

But, with a RPi 4 with 8Gb, you actually get a strong PC for a very low price. So it can definitely be used for coding!
Visual Studio Code is perfect on RPi for Java coding.

And with Pi4J you can even have a customized Raspberry Pi OS that is fully prepared for Java and JavaFX --> https://pi4j.com/pi4j-os/
 
Frank Delporte
Author
Posts: 22
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Matthews wrote:I'm getting to the age when I'm starting to think of things I can do when I retire (I'm 58)



Just a tip, this section of the Pi4J documentation and the related GitHub project, is created by Thomas Aarts as a retirement project ;-)
https://pi4j.com/examples/communityimplementation/
 
Greenhorn
Posts: 9
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@ Frank Delporte: Nice one! Congratulations.

I saw that Jbang now has Jupyter support. So I can say that Jupyter is my PI IDE now!
https://github.com/jbangdev/jbang-jupyter-tutorial


@Jacques Navarro: You can use the "Firmata" idea. Here is a blog abaout Arduino, but you can follow and use a Pico as well. I manage to do it myself. Need blog that!
https://foojay.io/today/control-your-arduino-with-spring/


@john Matthews and @Jacques Navarro: fingers crossed that we will see Raspberry Pi with 16g soon!
 
My, my, aren't you a big fella. Here, have a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic