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

Java Discussion :

.jar Ireport .exe


Sujet :

Java

  1. #1
    Membre actif
    Avatar de didate
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juin 2010
    Messages
    90
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2010
    Messages : 90
    Points : 238
    Points
    238
    Par défaut .jar Ireport .exe
    Bonjour chers ,

    J'ai un problème qui me taquine depuis quelque temps . Au fait j'ai réalisé une application de gestion du personnel d'une entreprise(en java IDE=netbeans bien-sûre) et dans cette application j'ai incorporé des rapports d'impression fait avec i report si j’exécute l'application directement via netbeans tout marche et j'arrive à bien imprimer au contraire si j'exécute via le fichier .jar (généré avec netbeans) l'impression de marche plus . y a t il quelqu'un qui peut me situé , j'en serai très reconnaissant merci à l'avance
    L'effort fait les forts

  2. #2
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    As tu bien configuré le classpath dans ton manifest?
    As tu bien placé les jars dont dépend le jar de ton appli au bon endroit?
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  3. #3
    Membre actif
    Avatar de didate
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juin 2010
    Messages
    90
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2010
    Messages : 90
    Points : 238
    Points
    238
    Par défaut ouf
    salut

    peut tu me guider un peu dans la configuration normal de la classpath

    les fichiers .jar sont dans le dossier lib du projet
    L'effort fait les forts

  4. #4
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    Comment est formé le fichier MANIFEST.MF du jar de ton application?
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  5. #5
    Membre actif
    Avatar de didate
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juin 2010
    Messages
    90
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2010
    Messages : 90
    Points : 238
    Points
    238
    Par défaut Manifest
    NB: pour la génération du fichier .jar de mon appli j'utilise l'outil de génération automatique (clean and build) de netbeans(version 6.9).

    contenu du fichier Minifest:


    Manifest-Version: 1.0
    X-COMMENT: Main-Class will be added automatically by build



    contenu du fichier build


    <?xml version="1.0" encoding="UTF-8"?>
    <!-- You may freely edit this file. See commented blocks below for -->
    <!-- some examples of how to customize the build. -->
    <!-- (If you delete it and reopen the project it will be recreated.) -->
    <!-- By default, only the Clean and Build commands use this build script. -->
    <!-- Commands such as Run, Debug, and Test only use this build script if -->
    <!-- the Compile on Save feature is turned off for the project. -->
    <!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
    <!-- in the project's Project Properties dialog box.-->
    <project name="Gestion" default="default" basedir=".">
    <description>Builds, tests, and runs the project Gestion.</description>
    <import file="nbproject/build-impl.xml"/>
    <!--

    There exist several targets which are by default empty and which can be
    used for execution of your tasks. These targets are usually executed
    before and after some main targets. They are:

    -pre-init: called before initialization of project properties
    -post-init: called after initialization of project properties
    -pre-compile: called before javac compilation
    -post-compile: called after javac compilation
    -pre-compile-single: called before javac compilation of single file
    -post-compile-single: called after javac compilation of single file
    -pre-compile-test: called before javac compilation of JUnit tests
    -post-compile-test: called after javac compilation of JUnit tests
    -pre-compile-test-single: called before javac compilation of single JUnit test
    -post-compile-test-single: called after javac compilation of single JUunit test
    -pre-jar: called before JAR building
    -post-jar: called after JAR building
    -post-clean: called after cleaning build products

    (Targets beginning with '-' are not intended to be called on their own.)

    Example of inserting an obfuscator after compilation could look like this:

    <target name="-post-compile">
    <obfuscate>
    <fileset dir="${build.classes.dir}"/>
    </obfuscate>
    </target>

    For list of available properties check the imported
    nbproject/build-impl.xml file.


    Another way to customize the build is by overriding existing main targets.
    The targets of interest are:

    -init-macrodef-javac: defines macro for javac compilation
    -init-macrodef-junit: defines macro for junit execution
    -init-macrodef-debug: defines macro for class debugging
    -init-macrodef-java: defines macro for class execution
    -do-jar-with-manifest: JAR building (if you are using a manifest)
    -do-jar-without-manifest: JAR building (if you are not using a manifest)
    run: execution of project
    -javadoc-build: Javadoc generation
    test-report: JUnit report generation

    An example of overriding the target for project execution could look like this:

    <target name="run" depends="Gestion-impl.jar">
    <exec dir="bin" executable="launcher.exe">
    <arg file="${dist.jar}"/>
    </exec>
    </target>

    Notice that the overridden target depends on the jar target and not only on
    the compile target as the regular run target does. Again, for a list of available
    properties which you can use, check the target you are overriding in the
    nbproject/build-impl.xml file.

    -->
    </project>
    L'effort fait les forts

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

Discussions similaires

  1. Un tuto pour transformer .jar en .exe
    Par arsenik7 dans le forum EDI et Outils pour Java
    Réponses: 17
    Dernier message: 08/04/2009, 18h58
  2. [JavaExe] Export jar puis exe
    Par alexDe dans le forum EDI et Outils pour Java
    Réponses: 2
    Dernier message: 15/03/2009, 16h05
  3. JAR versus EXE
    Par ABN84 dans le forum Général Java
    Réponses: 1
    Dernier message: 01/05/2008, 01h15
  4. Problème avec jar et exe !
    Par Ichigo-BaKa dans le forum Général Java
    Réponses: 17
    Dernier message: 25/06/2007, 17h13
  5. creation d un fichier jar ou .exe en java
    Par sadjia dans le forum JBuilder
    Réponses: 13
    Dernier message: 13/12/2002, 16h01

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