[JavaComm]Pb avec l'execution d'un code natif sous linux
Bonjour,
Je developpe en ce moment un petit logiciel qui doit envoyer des données sur les port série.
Je suis sous linux RedHat 7.3 et j'utilise le JDK J2se1.4.2.
Pour la communication avec le port serie, j'utilise la Java Communications API http://java.sun.com/products/javacomm/ avec la librairie pour linux RXTX http://www.rxtx.org/.
Lorsque je fais appel à une methode de l'API Java, j'obtiens le message suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x40008CEB
Function=_dl_relocate_object+0x77
Library=/lib/ld-linux.so.2
Current Java thread:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
- locked <0x44740270> (a java.util.Vector)
- locked <0x44758960> (a java.util.Vector)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
- locked <0x44753600> (a java.lang.Runtime)
at java.lang.System.loadLibrary(System.java:834)
at gnu.io.RXTXCommDriver.<clinit>(RXTXCommDriver.java:72)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at javax.comm.CommPortIdentifier.InitializeDriver(CommPortIdentifier.java:213)
at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:248)
at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:351)
at Passerelle.Main.main(Main.java:50)
...
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode)
#
# An error report file has been saved as hs_err_pid14963.log.
# Please refer to the file for further information.
# |
En cherchant sur le net, j'ai vallait mieux utiliser l'option -native lorsqu'on execute le code.
Le probleme est que quand je tappe la commande "java -native <maClasse" j'obtiens le message
Code:
Error: native VM not supported
Est-ce que quelqu'un peut m'expliquer comment corriger l'erreur "outside the VM"
ou sinon, où telecharger une VM pour linux qui supporte les threads natifs
Merci d'avance
Seb
[Modéré par Didier]
Ajout de tag dans le titre
Lire les règles du forum : Règles du forum Java