Java/Comunicazione seriale: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
fix (modifico a sezioni |
sintassi colorata→JavaComm |
||
Riga 53:
The contents of the properties file is typically just one line, the name of the java class with the native driver, e.g.:
The following is a hack which allows to deploy JavaComm via Web Start ignoring that brain-dead properties file. It has serious drawbacks, and might fail with newer JavaComm releases - should Sun ever come around and make a new version.
Riga 59:
First, turn off the security manager. Some doofus programmer at Sun decided that it would be cool to again and again check for the existence of the dreaded ''javax.comm.properties'' file, even after it has been loaded initially, for no other apparent reason than checking for the file.
Then, when initializing the JavaComm API, initialize the driver manually:
CommDriver commDriver = (CommDriver)Class.forName(driverName).newInstance();
commDriver.initialize();</source>
===== RxTx =====
|