Forum: Mikrocontroller und Digitale Elektronik Java RXTX und Eclipse


von Tai E. (tai)


Lesenswert?

Hi,

ich versuche verzeiweifelt RXTX für Java zu installieren. Ich benutzte 
Eclipse unter Windows.
Leider habe ich bei euch nur ein Beispielscript gefunden. 
http://www.mikrocontroller.net/articles/Serielle_Schnittstelle_unter_Java

Aber nicht wirklich wie man das insterlliert. Kann mir jemand sagen wie 
ich das richtig installieren.

Bisher habe ich immer alles in den JRE und JDK Ordner wie gewünschet, 
also die dll und jar Datein in die gewünschen Unterordner gepackt.

Aber ich bekomme immer diese Fehlermeldung:
1
Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
2
  Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
3
  Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
4
  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
5
  Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
6
  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
7
  Access restriction: The type CommPortIdentifier is not accessible due to restriction on required library C:\Java\jre6\lib\ext\RXTXcomm.jar
8
  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
9
  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
10
11
  at org.TaiSoft.RS232test.ErsteSchritte.main(ErsteSchritte.java:19)


bitte hilft mir! Ich bin schon seit gestern morgen dabei das 
hinzubekommen!

von TestX .. (xaos)


Lesenswert?

hm machs dir doch einfach....
füge RXTXcomm.jar als referenced library in dein projekt ein
kopier die beiden .dll dateien in deinen projekt ordner (root nicht src 
verzeichnis !)

fertig...

(p.s. installier dir mal ne tüte grammatik ;) )

von Tai E. (tai)


Lesenswert?

yo, allso soll dich die dll und die jar datein dort (jre und jde) 
löschen!

Und wie mache ich das mit der referenced? und wo soll die rxtxcomm.jar 
den liegen?

von TestX .. (xaos)


Lesenswert?

arbeite dich erstmal in die java+eclipse grundlagen ein bevor du damit 
hardware steuenr willst... in den projekt einstellungen kannst du .jar 
dateien als referenced library hinzufügen

von Tai E. (tai)


Lesenswert?

so habe es endlich hinbekommen! dein Tip war recht gut mit der refernce. 
Und das mit der Rechtschreibung muss ich wirklichn noch machen! Ich habe 
win7 bei mir raufgemacht und das rechtschreib prog noch nicht 
installiert!

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.