You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Julian Reschke <ju...@gmx.de> on 2006/10/06 16:57:14 UTC

SPI (jcr2spi) vs JDK 1.5

Hi,

I just noticed that parts of jcr2spi require JDK 1.5 (for "assert", such 
as in TransientRepository.java).

This would be a problem for me in practice, because (right now) the 
intended target platform for what I'm working on is JDK 1.4.

So could we avoid these dependencies, or do I need to communicate that 
requirement to the people I do my work for?

Best regards, Julian

Re: SPI (jcr2spi) vs JDK 1.5

Posted by Nicolas <nt...@gmail.com>.
Thanks for your answer Julian. It explains really well the issue I
encountered (I didn't dig it further as I explained since turning the
support for 1.5 was working fine).


BR
Nico
my blog! http://www.deviant-abstraction.net !!

Re: SPI (jcr2spi) vs JDK 1.5

Posted by Julian Reschke <ju...@gmx.de>.
Nicolas schrieb:
> Sorry, there is a misunderstanding.
> 
> Of course, everybody (even me) know assertions were introduced in Java 1.4.
> That is not the issue.

Actually, I forgot (and whas mislead by Eclipse).

> The issue is: JR doesn't build with Eclipse JDK 1.4 support enabled. You
> need to switch it to 1.5. It seems related to assertion (which is strange
> since as you said everybody know they were introduced in 1.4).  I didn't
> investigate this issue any further but what I know is in Eclipse you 
> need to
> enable Java 1.5 to be able to build the project.

Actually, you don't need to switch Eclipse to 1.5. Just configure the 
Java compliance settings so that "Generated .class compatibility" and 
"Source compatibility" are set to 1.4 as well (which is not the default).

> I have had this questions a few times, this is why I brought it up when
> Julian asked about it. It is not a major issue, but can be annoying to new
> users and we should ease as most as possible their path I think.

Best regards, Julian

Re: SPI (jcr2spi) vs JDK 1.5

Posted by Nicolas <nt...@gmail.com>.
Sorry, there is a misunderstanding.

Of course, everybody (even me) know assertions were introduced in Java 1.4.
That is not the issue.

The issue is: JR doesn't build with Eclipse JDK 1.4 support enabled. You
need to switch it to 1.5. It seems related to assertion (which is strange
since as you said everybody know they were introduced in 1.4).  I didn't
investigate this issue any further but what I know is in Eclipse you need to
enable Java 1.5 to be able to build the project.

I have had this questions a few times, this is why I brought it up when
Julian asked about it. It is not a major issue, but can be annoying to new
users and we should ease as most as possible their path I think.

Nicolas

On 10/9/06, Tobias Bocanegra <to...@day.com> wrote:
>
> no offense but imo java developers should know what features and
> language extensions were introduced in the respective jdk releases.
>
> also see:
> http://java.sun.com/j2se/1.5.0/docs/guide/language/
> http://java.sun.com/j2se/1.4.2/docs/guide/lang/index.html
>
> btw: http://jackrabbit.apache.org/doc/building.html states:
>
> Jackrabbit uses Maven  version 1.x as the build system and the source
> tree is mostly organized according to the Maven Standard Directory
> Layout. The Maven version 1.0.2 and Java Development Kit (JDK) version
> 1.4 are the standard build environment, but you should be quite fine
> also with Maven 1.1 and Java 5.
>
> regards, toby
>

Re: SPI (jcr2spi) vs JDK 1.5

Posted by Tobias Bocanegra <to...@day.com>.
no offense but imo java developers should know what features and
language extensions were introduced in the respective jdk releases.

also see:
http://java.sun.com/j2se/1.5.0/docs/guide/language/
http://java.sun.com/j2se/1.4.2/docs/guide/lang/index.html

btw: http://jackrabbit.apache.org/doc/building.html states:

Jackrabbit uses Maven  version 1.x as the build system and the source
tree is mostly organized according to the Maven Standard Directory
Layout. The Maven version 1.0.2 and Java Development Kit (JDK) version
1.4 are the standard build environment, but you should be quite fine
also with Maven 1.1 and Java 5.

regards, toby

On 10/9/06, Nicolas <nt...@gmail.com> wrote:
> Hi,
>
> About this issue, it is trivial, but each time I invite someone to try JR at
> my company, I got this question. It might be useful to write this info
> somewhere :)
>
> On 10/6/06, Julian Reschke <ju...@gmx.de> wrote:
> >
> > Tobias Bocanegra schrieb:
> > > assertions were introduced in jdk1.4
> > >
> > > http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html
> >
> > Oh well :-(
> >
> > Obviously Eclipse was checking for 1.3 source compliance by default.
> > Sorry for the embarrassing question.
> >
> > Best regards, Julian
> >
>
>
>
> --
> a+
> Nico
> my blog! http://www.deviant-abstraction.net !!
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Re: SPI (jcr2spi) vs JDK 1.5

Posted by Nicolas <nt...@gmail.com>.
Hi,

About this issue, it is trivial, but each time I invite someone to try JR at
my company, I got this question. It might be useful to write this info
somewhere :)

On 10/6/06, Julian Reschke <ju...@gmx.de> wrote:
>
> Tobias Bocanegra schrieb:
> > assertions were introduced in jdk1.4
> >
> > http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html
>
> Oh well :-(
>
> Obviously Eclipse was checking for 1.3 source compliance by default.
> Sorry for the embarrassing question.
>
> Best regards, Julian
>



-- 
a+
Nico
my blog! http://www.deviant-abstraction.net !!

Re: SPI (jcr2spi) vs JDK 1.5

Posted by Julian Reschke <ju...@gmx.de>.
Tobias Bocanegra schrieb:
> assertions were introduced in jdk1.4
> 
> http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html

Oh well :-(

Obviously Eclipse was checking for 1.3 source compliance by default. 
Sorry for the embarrassing question.

Best regards, Julian

Re: SPI (jcr2spi) vs JDK 1.5

Posted by Tobias Bocanegra <to...@day.com>.
assertions were introduced in jdk1.4

http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html

On 10/6/06, Julian Reschke <ju...@gmx.de> wrote:
> Hi,
>
> I just noticed that parts of jcr2spi require JDK 1.5 (for "assert", such
> as in TransientRepository.java).
>
> This would be a problem for me in practice, because (right now) the
> intended target platform for what I'm working on is JDK 1.4.
>
> So could we avoid these dependencies, or do I need to communicate that
> requirement to the people I do my work for?
>
> Best regards, Julian
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---