You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Conor MacNeill <co...@cenqua.com> on 2006/10/04 04:01:54 UTC

JavaHL JDK compatibility

Hi,

The current javahl build available with Subversion 1.4 (at least for
windows) requires JDK 1.5 to run since the classfile major version is
49. Was this intentional?

It may be a good idea to add a -target setting (and maybe -source) to
the javac command when building the next version.

Cheers
Conor

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: JavaHL JDK compatibility

Posted by Daniel Rall <dl...@collab.net>.
On Wed, 04 Oct 2006, Paul Burba wrote:

> Daniel Rall <dl...@collab.net> wrote on 10/04/2006 12:47:30 PM:
> 
> > On Wed, 04 Oct 2006, Conor MacNeill wrote:
> > 
> > > Hi,
> > > 
> > > The current javahl build available with Subversion 1.4 (at least for
> > > windows) requires JDK 1.5 to run since the classfile major version is
> > > 49. Was this intentional?
> > > 
> > > It may be a good idea to add a -target setting (and maybe -source) to
> > > the javac command when building the next version.
> > 
> > Conor, thanks much for noticing this problem.  I've got a patch which
> > works with autoconf (for *nix), and changes gen_win.py to spit out a
> > similar configuration.
> > 
> > Paul Burba mentioned he might be able to test out the Windows patch,
> > but if you're able to teake it for a test-drive, that'd be great, too.
> 
> Built the JavaHL bindings and ran the JavaHL tests without any problems on 
> Windows.

Thanks Paul.  Commited to trunk in r21765, and nominated for backport
to the 1.4.x line in r21766.

Re: JavaHL JDK compatibility

Posted by Paul Burba <pa...@softlanding.com>.
Mark Phippard <ma...@softlanding.com> wrote on 10/04/2006 02:10:30 PM:

> Paul Burba <pa...@softlanding.com> wrote on 10/04/2006 01:27:39 PM:
> 
> > > Paul Burba mentioned he might be able to test out the Windows patch,
> > > but if you're able to teake it for a test-drive, that'd be great, 
too.
> > 
> > Built the JavaHL bindings and ran the JavaHL tests without any 
problems 
> on 
> > Windows.
> 
> Did you verify that the class version was for JDK 1.2?  This article 
will 
> give some clues how to determine that.
> 
> http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version-p2.html
> 
> Mark

The build logs for test_javahl_msvc and __JAVAHL___msvc both show javac 
running with "-target 1.2" which I thought was enough (but you've been 
exposed to my minimal Java knowledge so you know that doesn't mean much 
:-).  So I checked a couple class files though and sure enough the version 
stamp is 46 as expected.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: JavaHL JDK compatibility

Posted by Mark Phippard <ma...@softlanding.com>.
Paul Burba <pa...@softlanding.com> wrote on 10/04/2006 01:27:39 PM:

> > Paul Burba mentioned he might be able to test out the Windows patch,
> > but if you're able to teake it for a test-drive, that'd be great, too.
> 
> Built the JavaHL bindings and ran the JavaHL tests without any problems 
on 
> Windows.

Did you verify that the class version was for JDK 1.2?  This article will 
give some clues how to determine that.

http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version-p2.html

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: JavaHL JDK compatibility

Posted by Paul Burba <pa...@softlanding.com>.
Daniel Rall <dl...@collab.net> wrote on 10/04/2006 12:47:30 PM:

> On Wed, 04 Oct 2006, Conor MacNeill wrote:
> 
> > Hi,
> > 
> > The current javahl build available with Subversion 1.4 (at least for
> > windows) requires JDK 1.5 to run since the classfile major version is
> > 49. Was this intentional?
> > 
> > It may be a good idea to add a -target setting (and maybe -source) to
> > the javac command when building the next version.
> 
> Conor, thanks much for noticing this problem.  I've got a patch which
> works with autoconf (for *nix), and changes gen_win.py to spit out a
> similar configuration.
> 
> Paul Burba mentioned he might be able to test out the Windows patch,
> but if you're able to teake it for a test-drive, that'd be great, too.

Built the JavaHL bindings and ran the JavaHL tests without any problems on 
Windows.

Paul B.
 
> [[[
> JavaHL: Compile Java bytecode for the target platform of a Java 1.2
> JVM.  The default is typically equal to the compiling JDK version, or
> the value for the -source flag to javac (if lower).  Assume our Java
> source code is JDK 1.2-compatible (as mentioned in
> subversion/bindings/java/javahl/README).
> 
> * configure.in
>   (JAVA_OLDEST_WORKING_VER): Set the minimum Java version to 1.2.
>   (SVN_CHECK_JDK): Pass in new JAVA_OLDEST_WORKING_VER parameter.
> 
> * build/ac-macros/java.m4
>   (SVN_CHECK_JDK): Accept new JAVA_OLDEST_WORKING_VER parameter.  Pass
>    it on to SVN_FIND_JDK.
>   (SVN_FIND_JDK): Accept new JAVA_OLDEST_WORKING_VER parameter.  In
>    JAVAC_FLAGS, set -target to this value, and -source to 1.2.
> 
> * build/generator/gen_win.py
>   (WinGeneratorBase.get_proj_sources): When compiling Java bytecode,
>    specify -target and -source as 1.2.  This is hard-coded for now,
>    but -target could later be made a configuration option in the
>    "[options]" section of build.conf.
> 
> Found by: Conor MacNeill <co...@cenqua.com>
> ]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: JavaHL JDK compatibility

Posted by Daniel Rall <dl...@collab.net>.
On Wed, 04 Oct 2006, Conor MacNeill wrote:

> Hi,
> 
> The current javahl build available with Subversion 1.4 (at least for
> windows) requires JDK 1.5 to run since the classfile major version is
> 49. Was this intentional?
> 
> It may be a good idea to add a -target setting (and maybe -source) to
> the javac command when building the next version.

Conor, thanks much for noticing this problem.  I've got a patch which
works with autoconf (for *nix), and changes gen_win.py to spit out a
similar configuration.

Paul Burba mentioned he might be able to test out the Windows patch,
but if you're able to teake it for a test-drive, that'd be great, too.

[[[
JavaHL: Compile Java bytecode for the target platform of a Java 1.2
JVM.  The default is typically equal to the compiling JDK version, or
the value for the -source flag to javac (if lower).  Assume our Java
source code is JDK 1.2-compatible (as mentioned in
subversion/bindings/java/javahl/README).

* configure.in
  (JAVA_OLDEST_WORKING_VER): Set the minimum Java version to 1.2.
  (SVN_CHECK_JDK): Pass in new JAVA_OLDEST_WORKING_VER parameter.

* build/ac-macros/java.m4
  (SVN_CHECK_JDK): Accept new JAVA_OLDEST_WORKING_VER parameter.  Pass
   it on to SVN_FIND_JDK.
  (SVN_FIND_JDK): Accept new JAVA_OLDEST_WORKING_VER parameter.  In
   JAVAC_FLAGS, set -target to this value, and -source to 1.2.
  
* build/generator/gen_win.py
  (WinGeneratorBase.get_proj_sources): When compiling Java bytecode,
   specify -target and -source as 1.2.  This is hard-coded for now,
   but -target could later be made a configuration option in the
   "[options]" section of build.conf.

Found by: Conor MacNeill <co...@cenqua.com>
]]]

Re: JavaHL JDK compatibility

Posted by Conor MacNeill <co...@cenqua.com>.
Garrett Rooney wrote:
> On 10/4/06, Conor MacNeill <co...@cenqua.com> wrote:
>> Hi,
>>
>> The current javahl build available with Subversion 1.4 (at least for
>> windows) requires JDK 1.5 to run since the classfile major version is
>> 49. Was this intentional?
> 
> I can't imagine why, I don't think we use any 1.5 features.
> 
>> It may be a good idea to add a -target setting (and maybe -source) to
>> the javac command when building the next version.
> 
> Sounds reasonable to me, got a patch to add it to the build system?
> 

Cool - I'll work one up.

Thanks
Conor

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: JavaHL JDK compatibility

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 10/4/06, Conor MacNeill <co...@cenqua.com> wrote:
> Hi,
>
> The current javahl build available with Subversion 1.4 (at least for
> windows) requires JDK 1.5 to run since the classfile major version is
> 49. Was this intentional?

I can't imagine why, I don't think we use any 1.5 features.

> It may be a good idea to add a -target setting (and maybe -source) to
> the javac command when building the next version.

Sounds reasonable to me, got a patch to add it to the build system?

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org