Compiling from CVS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling from CVS

Norman Elton
I apologize that this may be more of an Ant question, but I'm using  
the supplied build.xml, and can't get it to compile correctly. A  
simple "ant compile" generates...

     [javac] /usr/local/netauth2/jsr166/jsr166/src/main/java/util/
AbstractMap.java:52: error: '{' expected.
     [javac]    public abstract class AbstractMap<K,V> implements  
Map<K,V> {
     [javac]                                     ^
     [javac] /usr/local/netauth2/jsr166/jsr166/src/main/java/util/
AbstractMap.java:52: internal compiler error: Segmentation fault

This would seem to indicate that it's running a 1.4 compiler. If I  
specify a "java.home" attribute, I get...

file:/usr/local/netauth2/jsr166/jsr166/build.xml:111: Error running  
javac compiler

If I compile by hand, I get errors complaining that it cannot find  
Arrays.copyOf() for various classes.

Any ideas?

Thanks,

Norman
_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
Reply | Threaded
Open this post in threaded view
|

RE: Compiling from CVS

David Holmes
Norman,

> This would seem to indicate that it's running a 1.4 compiler.

Yes.

> If I specify a "java.home" attribute, I get...
>
> file:/usr/local/netauth2/jsr166/jsr166/build.xml:111: Error running
> javac compiler

Can't help there. Have you tried just setting the PATH to point to javac 5
when running ant?

> If I compile by hand, I get errors complaining that it cannot find
> Arrays.copyOf() for various classes.

Those methods are new in Mustang. It seems Arrays.java has just been added
to the cvs with these new methods. However I don't think you want to be
compiling the Mustang version of things. Does it not suffice to download the
jsr166 jar file and place it in your bootclasspath?

David Holmes

_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
Reply | Threaded
Open this post in threaded view
|

Re: Compiling from CVS

Doug Lea
In reply to this post by Norman Elton
Norman Elton wrote:
> I apologize that this may be more of an Ant question, but I'm using  
> the supplied build.xml, and can't get it to compile correctly. A  

Our full build scripts are always forward-looking to the next release.
For a pointwise fix, the easiest thing to do is to get only that
file, place in a directory whatever/java/util/concurrent, compile
it, make a jar from the root of it, and add to -Xbootclasspath.
This is harder to automate, but it avoids the sorts of major-release
incompatibilities you can otherwise encounter.

-Doug

_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
Reply | Threaded
Open this post in threaded view
|

Re: Compiling from CVS

Norman Elton
That is indeed a MUCH nicer solution than to run an entire beta code  
release. I grabbed LinkedBlockingQueue.java, compiled and JARed it.  
Works like a charm. Look forward to it being in the official Sun  
release.

Thanks again,

Norman

On Sep 5, 2005, at 6:31 PM, Doug Lea wrote:

> Norman Elton wrote:
>
>> I apologize that this may be more of an Ant question, but I'm  
>> using  the supplied build.xml, and can't get it to compile  
>> correctly. A
>>
>
> Our full build scripts are always forward-looking to the next release.
> For a pointwise fix, the easiest thing to do is to get only that
> file, place in a directory whatever/java/util/concurrent, compile
> it, make a jar from the root of it, and add to -Xbootclasspath.
> This is harder to automate, but it avoids the sorts of major-release
> incompatibilities you can otherwise encounter.
>
> -Doug
>
>

_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest