Hello,
motivated by the discussions about free java on this list, I did my first try at freeing a Java package (without promise yet, hence no ITP).
I chose jcalendar (http://www.toedter.com/en/jcalendar/) as I raised an RFP and it seems relatively simple, extracted it, installed free-java-sdk, put back the alternatives to Sun's Java (grrr! Shouldn't the package have less priority than java-package packages?).
Then in the jcalendar directory, I edited src/build.xml, replacing modern with jikes in the line:
<property name="build.compiler" value="modern" />
Then the following:
--- 8< --- $ cd src
$ PATH=/usr/lib/fjsdk/bin:$PATH JAVA_HOME=/usr/lib/fjsdk ant The -lib argument must be followed by a library location
$ PATH=/usr/lib/fjsdk/bin:$PATH JAVA_HOME=/usr/lib/fjsdk ant -debug Unable to locate tools.jar. Expected to find it in ?/lib/tools.jar Buildfile: build.xml
prepare:
[mkdir] Created dir: /data/Download/Java/buildcompile:
[copy] Copying 29 files to /data/Download/Java/build
[javac] Compiling 19 source files to /data/Download/Java/build[javac] Issued 1 semantic warning compiling "/data/Download/Java/src/com/toedter/components/JSpinField.java":
[javac] 113. int value = model.getNumber().intValue();
[javac] ^---^
[javac] *** Semantic Warning: Local "value" shadows a field of the same name in "com.toedter.components.JSpinField".
[javac] Issued 1 semantic warning compiling "/data/Download/Java/src/com/toedter/calendar/JMonthChooser.java":
[javac] 135. int month = getMonth();
[javac] ^---^
[javac] *** Semantic Warning: Local "month" shadows a field of the same name in "com.toedter.calendar.JMonthChooser".
[javac] Issued 3 semantic warnings compiling "/data/Download/Java/src/com/toedter/calendar/JDayChooser.java":
[javac] 207. int day = firstDayOfWeek;
[javac] ^-^
[javac] *** Semantic Warning: Local "day" shadows a field of the same name in "com.toedter.calendar.JDayChooser".
[javac] 288. Date day = tmpCalendar.getTime();
[javac] ^-^
[javac] *** Semantic Warning: Local "day" shadows a field of the same name in "com.toedter.calendar.JDayChooser".
[javac] 507. int day = new Integer(buttonText).intValue();
[javac] ^-^
[javac] *** Semantic Warning: Local "day" shadows a field of the same name in "com.toedter.calendar.JDayChooser".
[javac] Issued 1 semantic warning compiling "/data/Download/Java/src/com/toedter/components/JTitlePanel.java":
[javac] 69. JPanel northPanel = new JPanel();
[javac] ^--------^
[javac] *** Semantic Warning: Local "northPanel" shadows a field of the same name in "com.toedter.components.JTitlePanel".
[javac] Found 3 semantic errors compiling "/data/Download/Java/src/com/toedter/calendar/JDateChooser.java":
[javac] 59. protected JSpinner.DateEditor editor;
[javac] ^--------^
[javac] *** Semantic Error: Type "javax.swing.JSpinner$DateEditor" was not found.
[javac] 165. editor = new JSpinner.DateEditor(dateSpinner, tempDateFortmatString);
[javac] ^--------^
[javac] *** Semantic Error: Type "javax.swing.JSpinner$DateEditor" was not found.
[javac] 255. editor = new JSpinner.DateEditor(dateSpinner, dateFormatString);
[javac] ^--------^
[javac] *** Semantic Error: Type "javax.swing.JSpinner$DateEditor" was not found.
BUILD FAILED
/data/Download/Java/src/build.xml:76: Compile failed; see the compiler error output for details.
Total time: 9 seconds
$ PATH=/usr/lib/fjsdk/bin:$PATH JAVA_HOME=/usr/lib/fjsdk ant The -lib argument must be followed by a library location
$ PATH=/usr/lib/fjsdk/bin:$PATH JAVA_HOME=/usr/lib/fjsdk ant clean Unable to locate tools.jar. Expected to find it in ?/lib/tools.jar Buildfile: build.xml
prepare:
compile:
[javac] Compiling 1 source file to /data/Download/Java/build[javac] Found 3 semantic errors compiling "/data/Download/Java/src/com/toedter/calendar/JDateChooser.java":
[javac] 59. protected JSpinner.DateEditor editor;
[javac] ^--------^
[javac] *** Semantic Error: Type "javax.swing.JSpinner$DateEditor" was not found.
[javac] 165. editor = new JSpinner.DateEditor(dateSpinner, tempDateFortmatString);
[javac] ^--------^
[javac] *** Semantic Error: Type "javax.swing.JSpinner$DateEditor" was not found.
[javac] 255. editor = new JSpinner.DateEditor(dateSpinner, dateFormatString);
[javac] ^--------^
[javac] *** Semantic Error: Type "javax.swing.JSpinner$DateEditor" was not found.
BUILD FAILED
/data/Download/Java/src/build.xml:76: Compile failed; see the compiler error output for details.
Total time: 9 seconds
--- 8< ---
any idea how to go further? The compilation with Sun's java 1.4.2 works without warnings or errors. Should I try to install SwingWT or something similar? I also don't understand why ant has a different behaviour with or without -debug, and why 'ant clean' still spits compilation errors?
I honestly say that I have only basic java knowledge, enough to more or less understand code when I read it, and be able to patch it, and package it (freemind), but that's about it.
Oha, almost forgot: I'm at testing/sarge level: ii classpath-tools 0.0.20020812-1 Free 'javah', 'javap', 'serialver' ii fastjar 1:3.4.3-12 Jar creation utility ii jikes-sablevm 1.11.3-1 Wrapper for jikes using classes fr ii sablevm 1.11.3-1 Free implementation of Java Virtua ii free-java-sdk 1.0-1 Complete Java SDK environment ii ant 1.6.2-2 Java based build tool like make
Thanks, Eric
--
Gewalt ist die letzte Zuflucht der Inkompetenz.
Violence is the Last Resort of the Incompetent.
Gwalt jest ostatnem schronieniem niekompetencji.
La violence est le dernier refuge de l'incompetence.
~ Isaac Asimov
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

