A couple tweaks which make this easier for me:
The core of the functionality is to use IDE of your choice on the fastest, most familiar platform with your favorite editor. For me this is a gaming Windows system with Eclipse, sublime text, MobaXTerm, and VNC Viewer. The tradeoff is quicker response in the writing debugging, vs the need to a jar over to the Pi before being able to run.
Using MobaXterm gives you a GUI drag/drop-able file transfer capability (WinScp does too, but I prefer Mobas choice of providing a CLI terminal instead of second a window's explorer view of my host windows system). If you're running headless, you have your terminal right there. If you need the Pi's GUI output, window swapping to the VNC gets you everything except PI camera preview's.
The second trick is to compile to a runnable jar, using the eclipse option to "copy the required libraries into a sub-folder next ot the generated JAR"
This is advantageous because it allows you to copy the vast bulk of the required bytes only once (the MyRunnableJarName_lib directory holds all the full load of a maven project with 100MB). As you make incremental changes to the program it is only the < 1MB MyRunnableJarName.jar file which changes. Drag/drop transfer of the jar takes only a second or two.
Setting up a couple of mini-caller scripts allows two things. You can call either the runnable jar default main class, or any other class compiled into that same jar (when your java projects have several
entry classes) with only 6 keystrokes. s h space zero tab enter or s h space one tab enter will call the two scripts below
0_run_blink.sh
#!/bin/bash
# This calls whatever class was compiled for the runnable jar
# Dynamic linking required because the Noobs has a downlevel, pre Rpi3B wiringPi
sudo java -Dpi4j.linking=dynamic -jar Pi4J_Demos.jar
1_run_blink.sh
#!/bin/bash
# calls a specific class, even if the jar is runnable for another class
# Dynamic linking required because the Noobs has a downlevel, pre Rpi3B wiringPi
sudo java -Dpi4j.linking=dynamic -cp Pi4J_Demos.jar myJavaStuff.I2CExample