IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Entrée/Sortie Java Discussion :

[JNI] execution dans un JAR


Sujet :

Entrée/Sortie Java

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 124
    Points : 76
    Points
    76
    Par défaut [JNI] execution dans un JAR
    Bonjour,

    j'ai créé une classe qui me permet de lire les infos disque garce a JNI et une dll cree en C

    La classe marche nickel
    cependant quand je la met dans un fichier JAR j'ai le message d'erreur suivant
    • C:\Program Files\prog>java -jar monjar.jar
      java.lang.UnsatisfiedLinkError: SpaceDrive
      at App_Disk.RecupInfoDisk.SpaceDrive(Native Method)
      at App_Disk.App_DiskInfos.ChargeDiskInfo(App_DiskInfos.java:89)
      at App_Disk.App_DiskInfos.jbInit(App_DiskInfos.java:83)
      at App_Disk.App_DiskInfos.setParam(App_DiskInfos.java:46)
      at App_Disk.App_User$9.actionPerformed(App_User.java:531)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
      n Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.AbstractButton.doClick(Unknown Source)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
      at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
      d(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)


    qq'un peut il m'aider
    Merci





    [Modéré par Didier]
    Ajout de tag dans le titre
    Lire les règles du forum : Règles du forum Java

  2. #2
    Membre habitué
    Inscrit en
    Avril 2004
    Messages
    170
    Détails du profil
    Informations forums :
    Inscription : Avril 2004
    Messages : 170
    Points : 174
    Points
    174
    Par défaut
    Montre voir ton fichier META-INF que tu utilises pour creer ton jar.
    The path of excess
    leads to the tower of wisdom.
    (Enigma)

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 124
    Points : 76
    Points
    76
    Par défaut
    voila, mais je ne comprend pas ce que le manifest a a voir ?

    Manifest-Version: 1.0
    Main-Class: App_DBBStorage.App_User

  4. #4
    Membre habitué
    Inscrit en
    Avril 2004
    Messages
    170
    Détails du profil
    Informations forums :
    Inscription : Avril 2004
    Messages : 170
    Points : 174
    Points
    174
    Par défaut
    tu ne specifies rien de special dans ton classpath lorsque tu utilises cette classe ?
    The path of excess
    leads to the tower of wisdom.
    (Enigma)

  5. #5
    Membre régulier
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 124
    Points : 76
    Points
    76
    Par défaut
    non rien, ma dll se trouve dans le rep de ma classe ou dans le rep de mon jar

  6. #6
    Membre régulier
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 124
    Points : 76
    Points
    76
    Par défaut
    bon ben j'ai trouvé, ma classe doit se trouver dans le package default de mon jar ainsi que toutes les classes y faisant appelle

    Merci

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [JAR] comment executer un fichier inclus dans un JAR
    Par hedora dans le forum Entrée/Sortie
    Réponses: 9
    Dernier message: 02/02/2011, 14h52
  2. fichier xml dans un jar executable
    Par docv266 dans le forum Langage
    Réponses: 5
    Dernier message: 06/08/2007, 18h13
  3. executer un binaire dans un .jar
    Par yli_ren dans le forum Général Java
    Réponses: 5
    Dernier message: 25/06/2007, 16h20
  4. Réponses: 6
    Dernier message: 06/03/2007, 17h57
  5. [JNI]Execution d'une dll dans un jar avec package
    Par osopardo dans le forum Entrée/Sortie
    Réponses: 2
    Dernier message: 01/09/2006, 11h50

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo