You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Ivan Volosyuk <iv...@gmail.com> on 2006/05/26 00:30:36 UTC

classlib build problem?

I am experimenting with eclipse compiler from
org/apache/harmony/tools/javac/Main. The point is that I don't have
java5 at home computer, but I figured out that eclipse compiler in
ecj_3.2RC5.jar can be good substitution. I have tweaked the tools
javac wrapper and managed to start ant with that compiler.
There are number of errors in eclipse compiler complaining about wrong
usage of @Override and @Deprecated keywords. I simply removed all of
them to get through.
The problem which stopped me is:

    [javac] 1009. ERROR in
/home/ivan/experiments/harmony/trunk/modules/rmi/src/main/java/java/rmi/server/RMIClassLoader.java
    [javac]  (at line 22)
    [javac]     import java.util.Scanner;
    [javac]            ^^^^^^^^^^^^^^^^^
    [javac] The import java.util.Scanner cannot be resolved

Does there problem result from my experiments or the classlib build is
broken now?
-- 
Ivan

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Ivan Volosyuk <iv...@gmail.com>.
IMHO, the compilation problem is already fixed. At least I was able to
build recent classlib with eclipse compiler (using blackdown-jre-1.4.2
and drlvm).
Ah! Looks like the default rmi implementation was changed and it
doesn't contain the problem. The implementation relying on j.u.Scanner
is excluded from compilation process.
--
Ivan

2006/5/29, Paulex Yang <pa...@gmail.com>:
> > You can add the RI's class libraries using a command-line option if you
> > so choose, but I don;t think we should build the Harmony javac to have
> > dependencies upon the RI.
> >
> > Anyone want to get to work on j.u.Scanner ;-) ?
> >
> Tim,
>
> I'd like to work on it, but it is not a small class so it really needs
> some time...
>
> How about put a skeleton into SVN temporally to enable RMI compiling at
> first?

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Paulex Yang <pa...@gmail.com>.
Tim Ellison wrote:
> Vladimir Gorr wrote:
>   
>> maybe does it make sense adding the RI rt.jar to CLASSPATH for the
>> ECJ-based
>> compiler?
>> In this case all we didn't implemented will be taken from RI. Is this a
>> stupid idea?
>>     
>
> You can add the RI's class libraries using a command-line option if you
> so choose, but I don;t think we should build the Harmony javac to have
> dependencies upon the RI.
>
> Anyone want to get to work on j.u.Scanner ;-) ?
>   
Tim,

I'd like to work on it, but it is not a small class so it really needs 
some time...

How about put a skeleton into SVN temporally to enable RMI compiling at 
first?

> Regards,
> Tim
>
>   


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Ivan Volosyuk wrote:
> I have good idea. Let's move to eclipse compiler in classlib's build 
> process. :)

I believe we did this a long time ago...

geir

> This will allow us to build classlib using number of available JREs1.4.
> -- 
> Ivan
> 
> 2006/5/26, Vladimir Gorr <vv...@gmail.com>:
>> On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
>> >
>> > Vladimir Gorr wrote:
>> > > maybe does it make sense adding the RI rt.jar to CLASSPATH for the
>> > > ECJ-based
>> > > compiler?
>> > > In this case all we didn't implemented will be taken from RI. Is 
>> this a
>> > > stupid idea?
>> >
>> > You can add the RI's class libraries using a command-line option if you
>> > so choose, but I don;t think we should build the Harmony javac to have
>> > dependencies upon the RI.
>>
>>
>> Ok, I see and absolutely agree with you. But I have one question :-).
>> Suppose API developers will import some unimplemented (into Harmony) 
>> class
>> for the development needs
>> and build with Sun's compiler (He will see no any compiler's errors).
>> Are there the dependencies upon the RI for Harmony javac in this case?
>>
>>
>> Anyone want to get to work on j.u.Scanner ;-) ?
>>
>>
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Tim Ellison <t....@gmail.com>.
Ivan Volosyuk wrote:
> I have good idea. Let's move to eclipse compiler in classlib's build
> process. :)

There are instructions in the build file for how to switch the default
build compiler to use ECJ.

> This will allow us to build classlib using number of available JREs1.4.

The build needs a JDK that understands 1.5 syntax.

Regards,
Tim

> -- 
> Ivan
> 
> 2006/5/26, Vladimir Gorr <vv...@gmail.com>:
>> On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
>> >
>> > Vladimir Gorr wrote:
>> > > maybe does it make sense adding the RI rt.jar to CLASSPATH for the
>> > > ECJ-based
>> > > compiler?
>> > > In this case all we didn't implemented will be taken from RI. Is
>> this a
>> > > stupid idea?
>> >
>> > You can add the RI's class libraries using a command-line option if you
>> > so choose, but I don;t think we should build the Harmony javac to have
>> > dependencies upon the RI.
>>
>>
>> Ok, I see and absolutely agree with you. But I have one question :-).
>> Suppose API developers will import some unimplemented (into Harmony)
>> class
>> for the development needs
>> and build with Sun's compiler (He will see no any compiler's errors).
>> Are there the dependencies upon the RI for Harmony javac in this case?
>>
>>
>> Anyone want to get to work on j.u.Scanner ;-) ?
>>
>>
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Ivan Volosyuk <iv...@gmail.com>.
I have good idea. Let's move to eclipse compiler in classlib's build process. :)
This will allow us to build classlib using number of available JREs1.4.
--
Ivan

2006/5/26, Vladimir Gorr <vv...@gmail.com>:
> On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
> >
> > Vladimir Gorr wrote:
> > > maybe does it make sense adding the RI rt.jar to CLASSPATH for the
> > > ECJ-based
> > > compiler?
> > > In this case all we didn't implemented will be taken from RI. Is this a
> > > stupid idea?
> >
> > You can add the RI's class libraries using a command-line option if you
> > so choose, but I don;t think we should build the Harmony javac to have
> > dependencies upon the RI.
>
>
> Ok, I see and absolutely agree with you. But I have one question :-).
> Suppose API developers will import some unimplemented (into Harmony) class
> for the development needs
> and build with Sun's compiler (He will see no any compiler's errors).
> Are there the dependencies upon the RI for Harmony javac in this case?
>
>
> Anyone want to get to work on j.u.Scanner ;-) ?
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Vladimir Gorr <vv...@gmail.com>.
On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
>
> Vladimir Gorr wrote:
> > On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
> >>
> >> Vladimir Gorr wrote:
> >> > maybe does it make sense adding the RI rt.jar to CLASSPATH for the
> >> > ECJ-based
> >> > compiler?
> >> > In this case all we didn't implemented will be taken from RI. Is this
> a
> >> > stupid idea?
> >>
> >> You can add the RI's class libraries using a command-line option if you
> >> so choose, but I don;t think we should build the Harmony javac to have
> >> dependencies upon the RI.
> >
> > Ok, I see and absolutely agree with you. But I have one question :-).
> > Suppose API developers will import some unimplemented (into Harmony)
> class
> > for the development needs
> > and build with Sun's compiler (He will see no any compiler's errors).
> > Are there the dependencies upon the RI for Harmony javac in this case?
>
> Sorry, I don't understand the question.
>
> By default, our javac will run on the Harmony JRE and compile against
> the Harmony class libraries (i.e. no dependencies on the RI at all).
>
> However, it is possible against any other class libraries, including the
> RI (e.g. javac -cp rt.jar Foo.java).  The compiler is still running on
> the Harmony JRE.
>
> Does that answer your question?


Yes, thanks. My misunderstanding was we use the Sun's compiler to build the
Harmony classes.
Sorry for this.

Vladimir.


Regards,
> Tim
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

Re: classlib build problem?

Posted by Tim Ellison <t....@gmail.com>.
Vladimir Gorr wrote:
> On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
>>
>> Vladimir Gorr wrote:
>> > maybe does it make sense adding the RI rt.jar to CLASSPATH for the
>> > ECJ-based
>> > compiler?
>> > In this case all we didn't implemented will be taken from RI. Is this a
>> > stupid idea?
>>
>> You can add the RI's class libraries using a command-line option if you
>> so choose, but I don;t think we should build the Harmony javac to have
>> dependencies upon the RI.
> 
> Ok, I see and absolutely agree with you. But I have one question :-).
> Suppose API developers will import some unimplemented (into Harmony) class
> for the development needs
> and build with Sun's compiler (He will see no any compiler's errors).
> Are there the dependencies upon the RI for Harmony javac in this case?

Sorry, I don't understand the question.

By default, our javac will run on the Harmony JRE and compile against
the Harmony class libraries (i.e. no dependencies on the RI at all).

However, it is possible against any other class libraries, including the
RI (e.g. javac -cp rt.jar Foo.java).  The compiler is still running on
the Harmony JRE.

Does that answer your question?

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Vladimir Gorr <vv...@gmail.com>.
On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
>
> Vladimir Gorr wrote:
> > maybe does it make sense adding the RI rt.jar to CLASSPATH for the
> > ECJ-based
> > compiler?
> > In this case all we didn't implemented will be taken from RI. Is this a
> > stupid idea?
>
> You can add the RI's class libraries using a command-line option if you
> so choose, but I don;t think we should build the Harmony javac to have
> dependencies upon the RI.


Ok, I see and absolutely agree with you. But I have one question :-).
Suppose API developers will import some unimplemented (into Harmony) class
for the development needs
and build with Sun's compiler (He will see no any compiler's errors).
Are there the dependencies upon the RI for Harmony javac in this case?


Anyone want to get to work on j.u.Scanner ;-) ?


And something yet, possibly :-)...

Cheers,
Vladimir.

Regards,
> Tim
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

Re: classlib build problem?

Posted by Tim Ellison <t....@gmail.com>.
Vladimir Gorr wrote:
> maybe does it make sense adding the RI rt.jar to CLASSPATH for the
> ECJ-based
> compiler?
> In this case all we didn't implemented will be taken from RI. Is this a
> stupid idea?

You can add the RI's class libraries using a command-line option if you
so choose, but I don;t think we should build the Harmony javac to have
dependencies upon the RI.

Anyone want to get to work on j.u.Scanner ;-) ?

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Vladimir Gorr wrote:
> On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
>>
>> That's right.  When we compile with Sun's compiler it compiles against
>> the Sun class libraries, and when we compile with the Harmony
>> (ECJ-based) javac it compiles against the Harmony class libraries.
> 
> 
> Tim,
> 
> maybe does it make sense adding the RI rt.jar to CLASSPATH for the 
> ECJ-based
> compiler?
> In this case all we didn't implemented will be taken from RI. Is this a
> stupid idea?

Not stupid, but would mask things like this.  We just need someone to 
write j.u.Scanner :)

geir


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Vladimir Gorr <vv...@gmail.com>.
On 5/26/06, Tim Ellison <t....@gmail.com> wrote:
>
> That's right.  When we compile with Sun's compiler it compiles against
> the Sun class libraries, and when we compile with the Harmony
> (ECJ-based) javac it compiles against the Harmony class libraries.


Tim,

maybe does it make sense adding the RI rt.jar to CLASSPATH for the ECJ-based
compiler?
In this case all we didn't implemented will be taken from RI. Is this a
stupid idea?

Thanks,
Vladimir.

You could pass in the -classpath to our javac to pick up the reference
> implementation of the class libraries, but we should aim to fill in
> these gaps asap.
>
> Regards,
> Tim
>
> Alexey Petrenko wrote:
> > 2006/5/26, Mark Hindess <ma...@googlemail.com>:
> >> We don't have java.util.Scanner and
> >> so the only reason it is compiling is because the RI compiler assumes
> >> its own bootstrap classes so finds its java.util.Scanner.
> > Yes,  this can be a reason.
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

Re: classlib build problem?

Posted by Tim Ellison <t....@gmail.com>.
That's right.  When we compile with Sun's compiler it compiles against
the Sun class libraries, and when we compile with the Harmony
(ECJ-based) javac it compiles against the Harmony class libraries.

You could pass in the -classpath to our javac to pick up the reference
implementation of the class libraries, but we should aim to fill in
these gaps asap.

Regards,
Tim

Alexey Petrenko wrote:
> 2006/5/26, Mark Hindess <ma...@googlemail.com>:
>> We don't have java.util.Scanner and
>> so the only reason it is compiling is because the RI compiler assumes
>> its own bootstrap classes so finds its java.util.Scanner.
> Yes,  this can be a reason.
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: classlib build problem?

Posted by Alexey Petrenko <al...@gmail.com>.
2006/5/26, Mark Hindess <ma...@googlemail.com>:
> We don't have java.util.Scanner and
> so the only reason it is compiling is because the RI compiler assumes
> its own bootstrap classes so finds its java.util.Scanner.
Yes,  this can be a reason.

-- 
Alexey A. Petrenko
Intel Middleware Products Division

Re: classlib build problem?

Posted by Alexey Petrenko <al...@gmail.com>.
I've just built fresh Harmony sources without any problems.

2006/5/26, Ivan Volosyuk <iv...@gmail.com>:
> I am experimenting with eclipse compiler from
> org/apache/harmony/tools/javac/Main. The point is that I don't have
> java5 at home computer, but I figured out that eclipse compiler in
> ecj_3.2RC5.jar can be good substitution. I have tweaked the tools
> javac wrapper and managed to start ant with that compiler.
> There are number of errors in eclipse compiler complaining about wrong
> usage of @Override and @Deprecated keywords. I simply removed all of
> them to get through.
> The problem which stopped me is:
>
>    [javac] 1009. ERROR in
> /home/ivan/experiments/harmony/trunk/modules/rmi/src/main/java/java/rmi/server/RMIClassLoader.java
>    [javac]  (at line 22)
>    [javac]     import java.util.Scanner;
>    [javac]            ^^^^^^^^^^^^^^^^^
>    [javac] The import java.util.Scanner cannot be resolved
>
> Does there problem result from my experiments or the classlib build is
> broken now?
> --
> Ivan
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Alexey A. Petrenko
Intel Middleware Products Division