[kepler-dev] Java 1.5 for Kepler
Dan Higgins
higgins at nceas.ucsb.edu
Fri Sep 28 11:53:24 PDT 2007
Carlos,
Although I haven't heard from Ilkay, I went ahead and checked in
your suggested changes and set the build file to compile for Java 1.5.
Hopefully this won't create new problems ;-)
I do see several warning in the opendap prototype code (below) but
compilation does work.
[javac] C:\work\kepler\build\src\org\nddp\DataTypes.java:145:
warning: non-v
arargs call of varargs method with inexact argument type for last parameter;
[javac] cast to java.lang.Class for a varargs call
[javac] cast to java.lang.Class[] for a non-varargs call and to
suppress thi
s warning
[javac] method = objectClass.getMethod(property,
null);
[javac] ^
[javac] C:\work\kepler\build\src\org\nddp\DataTypes.java:153:
warning: non-v
arargs call of varargs method with inexact argument type for last parameter;
[javac] cast to java.lang.Object for a varargs call
[javac] cast to java.lang.Object[] for a non-varargs call and to
suppress th
is warning
[javac] returnedObject = method.invoke(object,null);
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 warnings
Dan
Carlos Rueda wrote:
> Hi Ilkay,
>
> FYI, according to
> http://forum.java.sun.com/thread.jspa?threadID=656737&messageID=3859717
> I changed your import to read (in my local copy):
> import org.apache.axis.constants.Style;
> and the file compiles OK under 1.5.
>
> Carlos
>
> Carlos Rueda wrote:
>> Hello Dan, Ilkay,
>>
>> Right, I just did a quick check of recompiling everything and it seems
>> MessageBasedWebService.java is the only file that needs the
>> source="1.4" flag: I only included it in a new target:
>> <target name="compile-dev-14"> <javac ...
>> includes="org/sdm/spa/MessageBasedWebService.java"
>> source="1.4"
>> ...
>>
>> and excluded it from the (modified) target:
>> <target name="compile-dev" depends="compile-dev-14"> <javac ...
>> excludes="org/sdm/spa/MessageBasedWebService.java"
>> ...
>>
>> Compilation completes successfully. Also, I don't expect any binary
>> compatibility problem with the apache axis dpendency, but I guess it
>> would be better to update that dependency as well.
>>
>> Great that you have brought up this topic!
>>
>> Thanks.
>> Carlos
>>
>>
>>
>> Dan Higgins wrote:
>>> Hi Ilkay,
>>> I did run into a problem in compiling Kepler without the 'source
>>> 1.4' setting. I get the error
>>>
>>> [javac] Compiling 915 source files to C:\work\kepler\build\classes
>>> [javac]
>>> C:\work\kepler\build\src\org\sdm\spa\MessageBasedWebService.java:85:
>>> as of release 1.5, 'enum' is a keyword, and may not be used as an
>>> identifier
>>> [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
>>> [javac] import org.apache.axis.enum.Style;
>>> [javac] ^
>>> [javac] 1 error
>>>
>>> It looks like the MessageBasedWebService actor calls an axis class
>>> that has 'enum' in the path and Java 1.5 does not like that! So it
>>> looks like the axis package we are using is pre Java 1.5. Is there a
>>> fix for this? (I am assuming you are familiar with this code.)
>>>
>>> Dan
>>>
>>> Dan Higgins wrote:
>>>> Hi All,
>>>>
>>>> As you may well know, current Kepler builds are based on Java
>>>> 1.4. The ant build file allows the use of Java 1.5 but the
>>>> '-source' command line option is set to '1.4'.
>>>> Several developers have wanted to use some Java features (e.g.
>>>> generics) that are present in Java 1.5 but not in Java 1.4. Since
>>>> Java 1.5 is readily available for Windows, Mac, and Linux, I do not
>>>> see any problems with simply dropping the '-source 1.4' switch from
>>>> the compiler command line and making 1.5 the default version of
>>>> Java for Kepler. Does anyone out there object to this, or know of
>>>> some problems that may occur?
>>>>
>>>> Dan Higgins
>>>>
>>>>
>>>
>> _______________________________________________
>> Kepler-dev mailing list
>> Kepler-dev at ecoinformatics.org
>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>>
--
*******************************************************************
Dan Higgins higgins at nceas.ucsb.edu
http://www.nceas.ucsb.edu/ Ph: 805-893-5127
National Center for Ecological Analysis and Synthesis (NCEAS) Marine Science Building - Room 3405
Santa Barbara, CA 93195
*******************************************************************
More information about the Kepler-dev
mailing list