User avatar
rafaband
Posts: 15
Joined: Sat Dec 03, 2016 12:50 pm

Remote JavaFX developer Pi and Windows

Mon Apr 17, 2017 4:19 pm

Is there any way to code Java on My PC and compile on my PI with eclipse?

User avatar
DougieLawson
Posts: 29337
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Remote JavaFX developer Pi and Windows

Mon Apr 17, 2017 4:39 pm

Yes. Build a jar file and you can use Java's "Build once, debug everywhere" feature to run that on a Raspberry.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

User avatar
rafaband
Posts: 15
Joined: Sat Dec 03, 2016 12:50 pm

Re: Remote JavaFX developer Pi and Windows

Fri May 05, 2017 1:05 am

DougieLawson wrote:Yes. Build a jar file and you can use Java's "Build once, debug everywhere" feature to run that on a Raspberry.
That's the problem!! I Have a NFC Shield on my PI, so i Can't build and test everywhere. By the way i'm using JavaFX and it's not working on PI.

I'm getting crazy!! I did connected Netbeans with Raspberry PI, it's working with "Hello World" console, but not with JavaFX Screen. The shield is working with Python, but i can't test it from my PC....

clicky
Posts: 202
Joined: Thu Oct 25, 2012 7:34 am

Re: Remote JavaFX developer Pi and Windows

Fri May 05, 2017 7:24 am

Not exactly what you asked but might be what you want:
http://remotevm.abstracthorizon.org/
You start jar file on your RPi, setup Eclipse on your PC/laptop and code. Selecting run from Eclipse will transfer all needed classpath stuff to RPi and start app. All System.out from your app running on RPi will be relayed back to your PC and displayed in output window - same as it would with locally run app. Let me know if you get stuck with it...

JohnAntonioCollins
Posts: 4
Joined: Mon May 01, 2017 10:45 pm

Re: Remote JavaFX developer Pi and Windows

Tue May 09, 2017 1:49 am

I'm looking into unit testing my Java on my development machine and not on the 'Pi. A mocking framework should let you test your code independent of the actual hardware. I'm going to use a mocking framework called Mockito. I have used it before but I need to get more in depth with it to test pi4j in my program. Only note so far: I ran into a snag because my development machine is 64bit and it threw errors when trying to mock the 32bit pi4j library. I plan on just virtualizing a 32 development environment for problems like that using VirtualBox. Here is a good, plain-spoken explanation of testing with mock objects and Mockito specifically. I assume you're already familiar with JUnit testing framework.

https://zeroturnaround.com/rebellabs/ho ... realities/

Return to “Java”

Who is online

Users browsing this forum: mamech and 4 guests