Hallo leute,
ich versuche schon seit Stunden die Java Communications Api Serial Programming/Serial Java - Wikibooks, open books for an open world zu installieren aber wenn ich dann im Java-Editor "
" eintippe sagt der compiler mir sofort das [c]import javax.comm.*;[/code] nicht exzistiert.
Habe die Java Communications Api unter dieser Anweisung installiert:
Software Download and Install
und dann unter
Kurz zu meinem System habe Win7 32bit.
Nun habe ich dies gemacht:
---------------------------------------------------------------
Die erste Frage was ist der Unterschied zwischen JRE und JDK?
Ich habe ein Ordner Java indem ist ein Ordner Jre7 und jdk1.7.0_02. Indem Ordner jdk1.7.0_02 ist aber nochmal ein Jre Ordner. Nun habe ich jeweils 3x bin und lib Ordner. Ich habe die dateien kopiert und in jedem lib und bin es rein getan. Classpath konnte ich nicht setzen da ich schon ein Classpath hatte mit dem Wert ".;E:\Program Files\Java\jre7\lib\ext\QTJava.zip".
Kann mir jemand weiter helfen?
Kurz zu was ich Java Communications Api brauche:
Ich muss auf die Serielle Schnittstelle Rs 232 zugreifen um mit einem Mikrocontroller zu kommunizieren.
MfG Ventura
hoffe auf Hilfe
ich versuche schon seit Stunden die Java Communications Api Serial Programming/Serial Java - Wikibooks, open books for an open world zu installieren aber wenn ich dann im Java-Editor "
Code:
import javax.comm.*; import java.util.*;
Habe die Java Communications Api unter dieser Anweisung installiert:
Software Download and Install
und dann unter
To receive location beacons (via a receiver on a serial port), you need to install Java Serial Communication package.
To download
JavaComm 2.0 for Windows, click "here" <----
Kurz zu meinem System habe Win7 32bit.
Nun habe ich dies gemacht:
Unzip the file javacomm20-win32.zip. This will produce a hierarchy with a top level directory commapi.
The examples in this document assume that you have unzipped the javacomm20-win32.zip file in your C: partition and your JDK installation is in C:\jdk1.1.6. If you have installed JDK in an other location or unzipped javacomm20-win32.zip in an other location modify the example commands appropriately.
If you are installing the Java communications API into a JRE (Java runtime environment) follow the same instructions as for the JDK except where noted. See the additional instructions for running using the JRE.
Copy win32com.dll to your <JDK>\bin directory.
C:\>copy c:\commapi\win32com.dll to c:\jdk1.1.6\bin
Copy comm.jar to your <JDK>\lib directory.
C:\>copy c:\commapi\comm.jar c:\jdk1.1.6\lib
Copy javax.comm.properties to your <JDK>\lib directory.
C:\>copy c:\commapi\javax.comm.properties c:\jdk1.1.6\lib
The javax.comm.properties file must be installed. If it is not, no ports will be found by the system.
Add comm.jar to your classpath (do not do this step for a JRE installation).
If you don't have a classpath defined:
C:\>set CLASSPATH=c:\jdk1.1.6\lib\comm.jar
If you already have a classpath defined:
C:\>set CLASSPATH=c:\jdk1.1.6\lib\comm.jar;%classpath%
Several serial port sample applications are provided with this release. One of them is BlackBox. To run BlackBox, first add BlackBox.jar to your classpath:
C:\>set CLASSPATH=c:\commapi\samples\Blackbox\BlackBox.jar;%CLASSPATH%
Now you can run BlackBox:
C:\>java BlackBox
One sample driver, NullDriver, is included in the samples\NullDriver directory. This is useful for folks attempting to write a new driver for their own hardware.
---------------------------------------------------------------
Die erste Frage was ist der Unterschied zwischen JRE und JDK?
Ich habe ein Ordner Java indem ist ein Ordner Jre7 und jdk1.7.0_02. Indem Ordner jdk1.7.0_02 ist aber nochmal ein Jre Ordner. Nun habe ich jeweils 3x bin und lib Ordner. Ich habe die dateien kopiert und in jedem lib und bin es rein getan. Classpath konnte ich nicht setzen da ich schon ein Classpath hatte mit dem Wert ".;E:\Program Files\Java\jre7\lib\ext\QTJava.zip".
Kann mir jemand weiter helfen?
Kurz zu was ich Java Communications Api brauche:
Ich muss auf die Serielle Schnittstelle Rs 232 zugreifen um mit einem Mikrocontroller zu kommunizieren.
MfG Ventura
hoffe auf Hilfe
Zuletzt bearbeitet: