Other
The Arduino IDE itself is written in Java, and it can communicate to the serial port via the RXTX Java library. That library is very similar to the Java Communications API extension. Internally the IDE remembers which port and baud rate you used last time. Unfortunately that internal implementation can not be considered public API you can reliably use. So you will have to keep your own settings to remember which COM port your Arduino card is using.
This interface sample presumes that you already know how to compile and run Java code. There are plenty of other resources on the Internet to teach you to program in Java. Most serious Java programmers use a Java IDE to create Java programs, like the free Eclipse IDE, but this example provides information for the less frequent Java programmer.
java
蓝牙
数据
No comment