Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden. Du solltest ein Upgrade durchführen oder ein alternativer Browser verwenden.
ich versuche seit heute morgen meine RS232 Schnittstelle zum laufen zu bringen.
Dafür wollte ich RXTX und Eclipse verwenden.
Ich habe die RXTX daten in meine jdk und jre kopiert wie es auf der homepage von rxtx steht.
Danach habe ich unter Project/Properties/Java Build Path/Librarie/Add External Jar ein rxtxcomm.jar eingefügt.
Aber leider bekomme ich immer diesen Fehler
Code:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
Access restriction: The method getPortIdentifiers() from the type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
Access restriction: The method getPortType() from the type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
Access restriction: The field PORT_SERIAL from the type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
Access restriction: The method getName() from the type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
Bitte hilft mir! Ich bin schon richtig an verzweifeln?
In Eclipse:
Window->Preferences->Java->Compiler->Errors/Warnings
dort unter "Deprecated and restricted API" das "Forbidden reference.." auf WARNING stellen, dann hast nur noch Warnings und kannst kompilieren.
Steht das wirklich auf deren HP? Tu das Jar aus dem JDK/JRE-Verzeichnis wieder raus, das hat da nichts zu suchen. Das gehört in ein Projektverzeichnis.
ich habe das jetzt wie madboy gesagt eingestellt! Jetzt bekomme ich folgende Fehlermeldung:
Code:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
CommPortIdentifier cannot be resolved to a type
CommPortIdentifier cannot be resolved
CommPortIdentifier cannot be resolved to a type
CommPortIdentifier cannot be resolved
Wenn ich dir Jar datei in den Projekt Ordner rein tun soll wo den? In das gleiche Packet von meiner auszuführenden Datei? und woll soll die DLL datein hin? Ich will das alles unter Windows ausführen
Für zusätzliche Jars machst du dir am Besten einen extra Ordner lib. Danach musst du diese natürlich noch in den Classpath einbinden. Bei Eclispe z.B. per Rechtsklick->Build Path->Add to Build Path
Die DLLs kannst du im Hauptverzeicnis liegen lassen. Ggf. musst du mittels Systemproperty java.library.path=path/../blubb den Ort angeben wo die DLLs liegen.