Skip to content

Commit 8f42a81

Browse files
author
floMeise
committed
Implemented the rest; currently still not working
1 parent 35eabd7 commit 8f42a81

13 files changed

+405
-529
lines changed

manifest.mf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
Manifest-Version: 1.0
2-
X-COMMENT: Main-Class will be added automatically by build
3-
Implementation-Version: 1.1.1
2+
X-COMMENT: Main-Class will be added automatically by build

nbproject/build-impl.xml

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,43 @@ is divided into following sections:
5454
<property file="nbproject/project.properties"/>
5555
</target>
5656
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
57+
<j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
58+
<j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
59+
<j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/>
60+
<j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/>
61+
<condition property="platform.javac" value="${platform.home}/bin/javac">
62+
<equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/>
63+
</condition>
64+
<property name="platform.javac" value="${platform.javac.tmp}"/>
65+
<j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/>
66+
<condition property="platform.java" value="${platform.home}/bin/java">
67+
<equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/>
68+
</condition>
69+
<property name="platform.java" value="${platform.java.tmp}"/>
70+
<j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/>
71+
<condition property="platform.javadoc" value="${platform.home}/bin/javadoc">
72+
<equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/>
73+
</condition>
74+
<property name="platform.javadoc" value="${platform.javadoc.tmp}"/>
75+
<condition property="platform.invalid" value="true">
76+
<or>
77+
<contains string="${platform.javac}" substring="$${platforms."/>
78+
<contains string="${platform.java}" substring="$${platforms."/>
79+
<contains string="${platform.javadoc}" substring="$${platforms."/>
80+
</or>
81+
</condition>
82+
<fail unless="platform.home">Must set platform.home</fail>
83+
<fail unless="platform.bootcp">Must set platform.bootcp</fail>
84+
<fail unless="platform.java">Must set platform.java</fail>
85+
<fail unless="platform.javac">Must set platform.javac</fail>
86+
<fail if="platform.invalid">
87+
The J2SE Platform is not correctly set up.
88+
Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.
89+
Either open the project in the IDE and setup the Platform with the same name or add it manually.
90+
For example like this:
91+
ant -Duser.properties.file=&lt;path_to_property_file&gt; jar (where you put the property "platforms.${platform.active}.home" in a .properties file)
92+
or ant -Dplatforms.${platform.active}.home=&lt;path_to_JDK_home&gt; jar (where no properties file is used)
93+
</fail>
5794
<available file="${manifest.file}" property="manifest.available"/>
5895
<condition property="splashscreen.available">
5996
<and>
@@ -187,15 +224,6 @@ is divided into following sections:
187224
<condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
188225
<length length="0" string="${endorsed.classpath}" when="greater"/>
189226
</condition>
190-
<condition else="false" property="jdkBug6558476">
191-
<and>
192-
<matches pattern="1\.[56]" string="${java.specification.version}"/>
193-
<not>
194-
<os family="unix"/>
195-
</not>
196-
</and>
197-
</condition>
198-
<property name="javac.fork" value="${jdkBug6558476}"/>
199227
<property name="jar.index" value="false"/>
200228
<property name="jar.index.metainf" value="${jar.index}"/>
201229
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
@@ -242,7 +270,7 @@ is divided into following sections:
242270
<property location="${build.dir}/empty" name="empty.dir"/>
243271
<mkdir dir="${empty.dir}"/>
244272
<mkdir dir="@{apgeneratedsrcdir}"/>
245-
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
273+
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
246274
<src>
247275
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
248276
<include name="*"/>
@@ -281,7 +309,7 @@ is divided into following sections:
281309
<sequential>
282310
<property location="${build.dir}/empty" name="empty.dir"/>
283311
<mkdir dir="${empty.dir}"/>
284-
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
312+
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
285313
<src>
286314
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
287315
<include name="*"/>
@@ -338,7 +366,7 @@ is divided into following sections:
338366
<attribute default="**" name="testincludes"/>
339367
<sequential>
340368
<property name="junit.forkmode" value="perTest"/>
341-
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
369+
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}">
342370
<batchtest todir="${build.test.results.dir}">
343371
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
344372
<filename name="@{testincludes}"/>
@@ -414,6 +442,9 @@ is divided into following sections:
414442
<classpath>
415443
<path path="@{classpath}"/>
416444
</classpath>
445+
<bootclasspath>
446+
<path path="${platform.bootcp}"/>
447+
</bootclasspath>
417448
</nbjpdastart>
418449
</sequential>
419450
</macrodef>
@@ -429,7 +460,9 @@ is divided into following sections:
429460
</macrodef>
430461
</target>
431462
<target name="-init-debug-args">
432-
<property name="version-output" value="java version &quot;${ant.java.version}"/>
463+
<exec executable="${platform.java}" outputproperty="version-output">
464+
<arg value="-version"/>
465+
</exec>
433466
<condition property="have-jdk-older-than-1.4">
434467
<or>
435468
<contains string="${version-output}" substring="java version &quot;1.0"/>
@@ -454,7 +487,7 @@ is divided into following sections:
454487
<attribute default="${debug.classpath}" name="classpath"/>
455488
<element name="customize" optional="true"/>
456489
<sequential>
457-
<java classname="@{classname}" dir="${work.dir}" fork="true">
490+
<java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">
458491
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
459492
<jvmarg line="${debug-args-line}"/>
460493
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
@@ -479,7 +512,7 @@ is divided into following sections:
479512
<attribute default="${run.classpath}" name="classpath"/>
480513
<element name="customize" optional="true"/>
481514
<sequential>
482-
<java classname="@{classname}" dir="${work.dir}" fork="true">
515+
<java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">
483516
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
484517
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
485518
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
@@ -669,7 +702,7 @@ is divided into following sections:
669702
<path path="${run.classpath}"/>
670703
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
671704
</pathconvert>
672-
<echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
705+
<echo level="info">${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
673706
</target>
674707
<target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
675708
<tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
@@ -696,7 +729,7 @@ is divided into following sections:
696729
<j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
697730
<echo level="info">To run this application from the command line without Ant, try:</echo>
698731
<property location="${dist.jar}" name="dist.jar.resolved"/>
699-
<echo level="info">java -jar "${dist.jar.resolved}"</echo>
732+
<echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo>
700733
</target>
701734
<target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
702735
<delete>
@@ -846,15 +879,16 @@ is divided into following sections:
846879
-->
847880
<target depends="init" if="have.sources" name="-javadoc-build">
848881
<mkdir dir="${dist.javadoc.dir}"/>
849-
<javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
882+
<javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
850883
<classpath>
851884
<path path="${javac.classpath}"/>
852885
</classpath>
853-
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
886+
<fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
854887
<filename name="**/*.java"/>
855888
</fileset>
856889
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
857890
<include name="**/*.java"/>
891+
<exclude name="*.java"/>
858892
</fileset>
859893
</javadoc>
860894
<copy todir="${dist.javadoc.dir}">

nbproject/genfiles.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ build.xml.script.CRC32=46539e47
33
build.xml.stylesheet.CRC32=[email protected]
44
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
55
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6-
nbproject/build-impl.xml.data.CRC32=52252129
7-
nbproject/build-impl.xml.script.CRC32=3b6cdfb4
8-
nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
6+
nbproject/build-impl.xml.data.CRC32=bbd0a1e0
7+
nbproject/build-impl.xml.script.CRC32=09f63ac0
8+
nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45

nbproject/project.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dist.jar=${dist.dir}/FileTransferTool.jar
2626
dist.javadoc.dir=${dist.dir}/javadoc
2727
endorsed.classpath=
2828
excludes=
29-
file.reference.xstream-1.3.1.jar=C:\\Users\\Flohw\\Documents\\Programmieren\\Eclipse\\Libs\\XStream\\xstream-1.3.1.jar
29+
file.reference.xstream.jar=C:\\Users\\Flohw\\Documents\\Programmieren\\Java\\Libs\\XStream\\xstream.jar
3030
includes=**
3131
jar.archive.disabled=${jnlp.enabled}
3232
jar.compress=true
@@ -35,14 +35,14 @@ javac.classpath=\
3535
${libs.apache-commons-io.classpath}:\
3636
${libs.absolutelayout.classpath}:\
3737
${reference.MD5.jar}:\
38-
${file.reference.xstream-1.3.1.jar}
38+
${file.reference.xstream.jar}
3939
# Space-separated list of extra javac options
4040
javac.compilerargs=
4141
javac.deprecation=false
4242
javac.processorpath=\
4343
${javac.classpath}
44-
javac.source=1.6
45-
javac.target=1.6
44+
javac.source=1.7
45+
javac.target=1.7
4646
javac.test.classpath=\
4747
${javac.classpath}:\
4848
${build.classes.dir}
@@ -72,7 +72,7 @@ main.class=de.flomeise.filetransfertool.MainWindow
7272
manifest.file=manifest.mf
7373
meta.inf.dir=${src.dir}/META-INF
7474
mkdist.disabled=false
75-
platform.active=default_platform
75+
platform.active=JDK_1.7
7676
project.MD5=../MD5
7777
reference.MD5.jar=${project.MD5}/dist/MD5.jar
7878
run.classpath=\

nbproject/project.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<configuration>
55
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
66
<name>FileTransferTool</name>
7+
<explicit-platform explicit-source-supported="true"/>
78
<source-roots>
89
<root id="src.dir"/>
910
</source-roots>

src/de/flomeise/filetransfertool/AboutDialog.form

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</Group>
4040
</Group>
4141
</Group>
42-
<EmptySpace pref="46" max="32767" attributes="0"/>
42+
<EmptySpace pref="24" max="32767" attributes="0"/>
4343
</Group>
4444
</Group>
4545
</DimensionLayout>
@@ -86,9 +86,7 @@
8686
</Component>
8787
<Component class="javax.swing.JLabel" name="jLabel4">
8888
<Properties>
89-
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
90-
<Connection code="FileTransferTool.VERSION.toString()" type="code"/>
91-
</Property>
89+
<Property name="text" type="java.lang.String" value="Currently not available"/>
9290
</Properties>
9391
</Component>
9492
<Component class="javax.swing.JLabel" name="jLabel5">

0 commit comments

Comments
 (0)