#1 Le 23/07/2009, à 11:49
- archadius
[Résolu] pb installation J2SE
Bonjour,
J'essaie d'installer un programme (Java) nommé Treeviz (http://www.randelshofer.ch/treeviz/index.html) et je rencontre cette erreur lorsque j'exécute ant :
$ ant
Buildfile: build.xml
-pre-init:
-init-private:
-init-user:
-init-project:
-init-macrodef-property:
-do-init:
BUILD FAILED
/home/moi/src/Treeviz/nbproject/build-impl.xml:79: The J2SE Platform is not correctly set up.
Your active platform is: JDK_1.6, but the corresponding property "platforms.JDK_1.6.home" is not found in the project's properties files.
Either open the project in the IDE and setup the Platform with the same name or add it manually.
For example like this:
ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.JDK_1.6.home" in a .properties file)
or ant -Dplatforms.JDK_1.6.home=<path_to_JDK_home> jar (where no properties file is used)
Total time: 0 seconds
La plateforme JDK a bien été installée via Synaptic, mais je ne sais comment appliquer les conseils donnés dans ce message d'erreur.
- "open the project in the IDE and setup the Platform with the same name or add it manually."
Lorsque j'ouvre le fichier build.xml dans Eclipse, j'ai ce message d'erreur :
"Specified buildfile does not contain a javac task".
- quant aux commandes suggérées, je ne sais quels chemins fournir.
Voilà un output plus verbeux :
$ ant -v
Apache Ant version 1.7.1 compiled on October 3 2008
Buildfile: build.xml
Detected Java version: 1.6 in: /usr/lib/jvm/java-6-sun-1.6.0.10/jre
Detected OS: Linux
parsing buildfile /home/moi/src/Treeviz/build.xml with URI = file:/home/moi/src/Treeviz/build.xml
Project base dir set to: /home/moi/src/Treeviz
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
Importing file /home/moi/src/Treeviz/nbproject/build-impl.xml from /home/moi/src/Treeviz/build.xml
parsing buildfile /home/moi/src/Treeviz/nbproject/build-impl.xml with URI = file:/home/moi/src/Treeviz/nbproject/build-impl.xml
Importing file /home/moi/src/Treeviz/nbproject/profiler-build-impl.xml from /home/moi/src/Treeviz/build.xml
parsing buildfile /home/moi/src/Treeviz/nbproject/profiler-build-impl.xml with URI = file:/home/moi/src/Treeviz/nbproject/profiler-build-impl.xml
Already defined in main or a previous import, ignore default
Build sequence for target(s) `default' is [-pre-init, -init-private, -init-user, -init-project, -init-macrodef-property, -do-init, -post-init, -init-check, -init-macrodef-javac, -init-macrodef-junit, -init-debug-args, -init-macrodef-nbjpda, -init-macrodef-debug, -init-macrodef-java, -init-presetdef-jar, init, deps-jar, -check-automatic-build, -clean-after-automatic-build, -verify-automatic-build, -pre-pre-compile, -pre-compile, -compile-depend, -do-compile, -post-compile, compile, -pre-pre-compile-test, -pre-compile-test, -compile-test-depend, -do-compile-test, -post-compile-test, compile-test, -pre-test-run, -do-test-run, test-report, -post-test-run, -test-browse, test, -pre-jar, -pre-pre-jar, -do-jar-with-manifest, -do-jar-without-manifest, -do-jar-with-mainclass, -do-jar-with-libraries, -post-jar, jar, -javadoc-build, -javadoc-browse, javadoc, default]
Complete build sequence is [-pre-init, -init-private, -init-user, -init-project, -init-macrodef-property, -do-init, -post-init, -init-check, -init-macrodef-javac, -init-macrodef-junit, -init-debug-args, -init-macrodef-nbjpda, -init-macrodef-debug, -init-macrodef-java, -init-presetdef-jar, init, deps-jar, -check-automatic-build, -clean-after-automatic-build, -verify-automatic-build, -pre-pre-compile, -pre-compile, -compile-depend, -do-compile, -post-compile, compile, -pre-pre-compile-test, -pre-compile-test, -compile-test-depend, -do-compile-test, -post-compile-test, compile-test, -pre-test-run, -do-test-run, test-report, -post-test-run, -test-browse, test, -pre-jar, -pre-pre-jar, -do-jar-with-manifest, -do-jar-without-manifest, -do-jar-with-mainclass, -do-jar-with-libraries, -post-jar, jar, -javadoc-build, -javadoc-browse, javadoc, default, -pre-debug-fix, -pre-compile-test-single, -do-compile-test-single, -post-compile-test-single, compile-test-single, Treeviz-impl.-do-debug-fix-test, -pre-test-run-single, Treeviz-impl.-do-test-run-single, -profile-pre-init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check, profile-init, profile-test-single, -debug-start-debugger-stepinto, -debug-start-debuggee, debug-stepinto, Treeviz-impl.-javadoc-browse, -pre-compile-single, -do-compile-single, -post-compile-single, compile-single, profile-applet, -do-test-run-single, Treeviz-impl.-post-test-run-single, -do-not-recompile, -debug-start-debugger, -debug-start-debuggee-single, Treeviz-impl.debug-single, profile, -profiler-impl.default, Treeviz-impl.-do-test-run, Treeviz-impl.compile-single, Treeviz-impl.-init-debug-args, Treeviz-impl.-init-macrodef-javac, Treeviz-impl.-pre-test-run-single, debug, -profiler-impl.-profile-pre-init, Treeviz-impl.-verify-automatic-build, Treeviz-impl.-post-compile, -profiler-impl.-profile-init-check, Treeviz-impl.test, Treeviz-impl.compile-test, Treeviz-impl.-do-init, Treeviz-impl.-pre-debug-fix, Treeviz-impl.-init-macrodef-property, Treeviz-impl.-debug-start-debuggee-test, profile-single, Treeviz-impl.-init-macrodef-debug, -debug-start-debuggee-test, Treeviz-impl.-do-compile-test-single, -do-debug-fix-test, debug-fix-test, Treeviz-impl.-pre-pre-compile, run, Treeviz-impl.-pre-pre-compile-test, Treeviz-impl.deps-clean, -profiler-impl.profile-init, -profiler-impl.profile-applet, -post-clean, -do-debug-fix, -debug-start-debugger-test, Treeviz-impl.debug-test, Treeviz-impl.-pre-test-run, Treeviz-impl.-do-jar-with-mainclass, Treeviz-impl.-init-macrodef-java, Treeviz-impl.-post-test-run, Treeviz-impl.-do-clean, Treeviz-impl.-debug-start-debugger-test, Treeviz-impl.run-applet, Treeviz-impl.debug-stepinto, Treeviz-impl.-init-check, Treeviz-impl.-init-macrodef-nbjpda, Treeviz-impl.-init-presetdef-jar, -profiler-impl.profile-single, Treeviz-impl.-post-clean, Treeviz-impl.debug-fix, Treeviz-impl.-do-debug-fix, Treeviz-impl.-test-browse, Treeviz-impl.-pre-jar, deps-clean, Treeviz-impl.-do-compile-single, Treeviz-impl.-pre-compile-test, Treeviz-impl.debug-fix-test, -debug-start-debuggee-applet, debug-applet, Treeviz-impl.-debug-start-debuggee-applet, Treeviz-impl.-init-private, Treeviz-impl.javadoc, Treeviz-impl.-init-project, Treeviz-impl.jar, Treeviz-impl.-do-jar-with-libraries, Treeviz-impl.-pre-compile-test-single, Treeviz-impl.compile-test-single, Treeviz-impl.-pre-pre-jar, debug-test, Treeviz-impl.-debug-start-debugger, Treeviz-impl.run-single, Treeviz-impl.-post-init, Treeviz-impl.-pre-init, Treeviz-impl.-init-user, -profiler-impl.profile-test-single, Treeviz-impl.-debug-start-debuggee, Treeviz-impl.-post-compile-single, Treeviz-impl.-check-automatic-build, Treeviz-impl.-post-compile-test-single, Treeviz-impl.test-report, Treeviz-impl.-do-jar-with-manifest, run-applet, -post-test-run-single, test-single, Treeviz-impl.-do-not-recompile, Treeviz-impl.-compile-test-depend, Treeviz-impl.-do-compile, -profiler-impl.-profile-init-macrodef-profile, debug-single, Treeviz-impl.-debug-start-debuggee-single, Treeviz-impl.-init-macrodef-junit, Treeviz-impl.-clean-after-automatic-build, -do-clean, Treeviz-impl.-javadoc-build, -profiler-impl.profile, Treeviz-impl.compile, Treeviz-impl.default, Treeviz-impl.debug-applet, Treeviz-impl.-debug-start-debugger-stepinto, -profiler-impl.-profile-post-init, Treeviz-impl.deps-jar, Treeviz-impl.-post-compile-test, Treeviz-impl.clean, Treeviz-impl.run, Treeviz-impl.-compile-depend, debug-fix, clean, run-single, Treeviz-impl.-do-compile-test, Treeviz-impl.init, Treeviz-impl.-do-jar-without-manifest, Treeviz-impl.-pre-compile-single, Treeviz-impl.-post-jar, Treeviz-impl.debug, Treeviz-impl.test-single, , Treeviz-impl.-pre-compile]
-pre-init:
-init-private:
[property] Loading /home/moi/src/Treeviz/nbproject/private/config.properties
Property "config" has not been set
[property] Loading /home/moi/src/Treeviz/nbproject/private/configs/${config}.properties
[property] Unable to find property file: /home/moi/src/Treeviz/nbproject/private/configs/${config}.properties
[property] Loading /home/moi/src/Treeviz/nbproject/private/private.properties
-init-user:
[property] Loading /Users/werni/.netbeans/6.5/build.properties
[property] Unable to find property file: /Users/werni/.netbeans/6.5/build.properties
-init-project:
Property "config" has not been set
[property] Loading /home/moi/src/Treeviz/nbproject/configs/${config}.properties
[property] Unable to find property file: /home/moi/src/Treeviz/nbproject/configs/${config}.properties
[property] Loading /home/moi/src/Treeviz/nbproject/project.properties
Property "libs.swing-layout.classpath" has not been set
Property "libs.swing-layout.classpath" has not been set
Property "libs.junit.classpath" has not been set
Property "libs.swing-layout.classpath" has not been set
Property "libs.junit.classpath" has not been set
Property "libs.swing-layout.classpath" has not been set
Property "libs.swing-layout.classpath" has not been set
Property "libs.junit.classpath" has not been set
Property "src.dir" has not been set
Property "libs.swing-layout.classpath" has not been set
Override ignored for property "application.args"
-init-macrodef-property:
[macrodef] creating macro http://www.netbeans.org/ns/j2se-project/1:property
-do-init:
Property "platforms.JDK_1.6.home" has not been set
Property "platforms.JDK_1.6.bootclasspath" has not been set
Property "platforms.JDK_1.6.compile" has not been set
Property "platforms.JDK_1.6.javac" has not been set
Override ignored for property "platform.javac"
Property "platforms.JDK_1.6.java" has not been set
Override ignored for property "platform.java"
Property "platforms.JDK_1.6.javadoc" has not been set
Override ignored for property "platform.javadoc"
BUILD FAILED
/home/moi/src/Treeviz/nbproject/build-impl.xml:79: The J2SE Platform is not correctly set up.
Your active platform is: JDK_1.6, but the corresponding property "platforms.JDK_1.6.home" is not found in the project's properties files.
Either open the project in the IDE and setup the Platform with the same name or add it manually.
For example like this:
ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.JDK_1.6.home" in a .properties file)
or ant -Dplatforms.JDK_1.6.home=<path_to_JDK_home> jar (where no properties file is used)
at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:142)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 0 seconds
Quelqu'un a-t-il une idée ?
Dernière modification par archadius (Le 23/07/2009, à 15:31)
Hors ligne
#2 Le 23/07/2009, à 15:30
- archadius
Re : [Résolu] pb installation J2SE
Problème résolu, le fichier build.xml n'était pas le bon.
Hors ligne