public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* kawa lib and jdk version
@ 2016-04-29 13:48 Damien Mattei
  2016-04-29 15:53 ` Per Bothner
  0 siblings, 1 reply; 5+ messages in thread
From: Damien Mattei @ 2016-04-29 13:48 UTC (permalink / raw)
  To: Kawa mailing list

hi,

i'm want to run  kawa on debian server using tomcat and jdk7 , if i get
the binary distribution of kawa for now i have compatibility with jdk7
and above, but what happens if i had get the source distribution of kawa
and compile it on the development platform with jdk8 , will it be
compatible with jdk7 and the tomcat server under debian if i
 deploy an application packaged with the kawa-2.1.jar compiled with jdk8?

Damien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kawa lib and jdk version
  2016-04-29 13:48 kawa lib and jdk version Damien Mattei
@ 2016-04-29 15:53 ` Per Bothner
  2016-05-02 10:22   ` Damien MATTEI
  0 siblings, 1 reply; 5+ messages in thread
From: Per Bothner @ 2016-04-29 15:53 UTC (permalink / raw)
  To: Damien Mattei, Kawa mailing list

On 04/29/2016 06:48 AM, Damien Mattei wrote:

> i'm want to run  kawa on debian server using tomcat and jdk7 , if i get
> the binary distribution of kawa for now i have compatibility with jdk7
> and above, but what happens if i had get the source distribution of kawa
> and compile it on the development platform with jdk8 , will it be
> compatible with jdk7 and the tomcat server under debian if i
>   deploy an application packaged with the kawa-2.1.jar compiled with jdk8?

There are two parts to this issue:
(1) Make sure Kawa doesn't depend on any optional Java 8 features.
That shouldn't be a problem if you use configure+make (since in that case
you would have to explicitly request Java 8 features), but it's a bit trickier
if you build with Ant (because of the auto-configuration in Kawa's build.xml).

(2) Make sure you build the class files for the correct version of the JVM.
That means you need to pass -target 7 to the javac command.  The following
is believed to work:
   export JAVAC='javac -target 7'
   configure --with-java-source=7
   make

The  --with-java-source=7 is probably not needed, but it's a good idea to
specify it.  (One reason is the Kawa default might change.)

You might have to experiment a bit, and you might run into a Kawa bug.
(If so, let me know.)
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kawa lib and jdk version
  2016-04-29 15:53 ` Per Bothner
@ 2016-05-02 10:22   ` Damien MATTEI
  2016-05-02 14:27     ` Per Bothner
  0 siblings, 1 reply; 5+ messages in thread
From: Damien MATTEI @ 2016-05-02 10:22 UTC (permalink / raw)
  To: Per Bothner; +Cc: Kawa mailing list

Le Friday 29 April 2016 17:53:14 Per Bothner, vous avez écrit :
> On 04/29/2016 06:48 AM, Damien Mattei wrote:
> 
> > i'm want to run  kawa on debian server using tomcat and jdk7 , if i get
> > the binary distribution of kawa for now i have compatibility with jdk7
> > and above, but what happens if i had get the source distribution of kawa
> > and compile it on the development platform with jdk8 , will it be
> > compatible with jdk7 and the tomcat server under debian if i
> >   deploy an application packaged with the kawa-2.1.jar compiled with jdk8?
> 
> There are two parts to this issue:
> (1) Make sure Kawa doesn't depend on any optional Java 8 features.
> That shouldn't be a problem if you use configure+make (since in that case
> you would have to explicitly request Java 8 features), but it's a bit trickier
> if you build with Ant (because of the auto-configuration in Kawa's build.xml).
> 
> (2) Make sure you build the class files for the correct version of the JVM.
> That means you need to pass -target 7 to the javac command.  The following
> is believed to work:
>    export JAVAC='javac -target 7'
>    configure --with-java-source=7
>    make
> 
> The  --with-java-source=7 is probably not needed, but it's a good idea to
> specify it.  (One reason is the Kawa default might change.)
> 
> You might have to experiment a bit, and you might run into a Kawa bug.
> (If so, let me know.)

thanks ,
i had made few attemps to work with jdk7,unfortunately it complains about a major version of 51 (my platform) instead of 52 (kawa)
so i will use jdk8 where all is ok ,it's just that where i work servers are under jdk7 but i hope it will be upgraded soon
regards,
damien

-- 
Damien.Mattei@unice.fr, Damien.Mattei@oca.eu, UNS / OCA / CNRS

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kawa lib and jdk version
  2016-05-02 10:22   ` Damien MATTEI
@ 2016-05-02 14:27     ` Per Bothner
  2016-05-03  9:30       ` Damien MATTEI
  0 siblings, 1 reply; 5+ messages in thread
From: Per Bothner @ 2016-05-02 14:27 UTC (permalink / raw)
  To: Damien MATTEI; +Cc: Kawa mailing list



On 05/02/2016 03:22 AM, Damien MATTEI wrote:

> i had made few attemps to work with jdk7,unfortunately it complains about a major version of 51 (my platform) instead of 52 (kawa)
> so i will use jdk8 where all is ok ,it's just that where i work servers are under jdk7 but i hope it will be upgraded soon

That is why you have to compile Kawa with '-target 7', so that javac with generated classfile version 51.

I just did a test - you actually also have to specify -source 7.  The following works:

$ JAVAC='javac -source 7 -target 7' ./configure --with-java-source=7 ...other-options...
$ make all

Then I was able run the resulting kawa.jar on java 7.

Of course this assuming you're using the JDK 1.8 to "cross-compile" Kawa so
the result can be used on JDK 1.7.
If you're using JDK 1.7 to build Kawa, it should just work.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kawa lib and jdk version
  2016-05-02 14:27     ` Per Bothner
@ 2016-05-03  9:30       ` Damien MATTEI
  0 siblings, 0 replies; 5+ messages in thread
From: Damien MATTEI @ 2016-05-03  9:30 UTC (permalink / raw)
  To: Per Bothner; +Cc: Kawa mailing list

hi Per,
the sys admin has upgraded the debian server to jdk8 to match my development platform so there 's no needs to use jdk7 more
thanks for your help,
regards 
Damien

Le Monday 02 May 2016 16:27:34 Per Bothner, vous avez écrit :
> 
> On 05/02/2016 03:22 AM, Damien MATTEI wrote:
> 
> > i had made few attemps to work with jdk7,unfortunately it complains about a major version of 51 (my platform) instead of 52 (kawa)
> > so i will use jdk8 where all is ok ,it's just that where i work servers are under jdk7 but i hope it will be upgraded soon
> 
> That is why you have to compile Kawa with '-target 7', so that javac with generated classfile version 51.
> 
> I just did a test - you actually also have to specify -source 7.  The following works:
> 
> $ JAVAC='javac -source 7 -target 7' ./configure --with-java-source=7 ...other-options...
> $ make all
> 
> Then I was able run the resulting kawa.jar on java 7.
> 
> Of course this assuming you're using the JDK 1.8 to "cross-compile" Kawa so
> the result can be used on JDK 1.7.
> If you're using JDK 1.7 to build Kawa, it should just work.



-- 
Damien.Mattei@unice.fr, Damien.Mattei@oca.eu, UNS / OCA / CNRS

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-03  9:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29 13:48 kawa lib and jdk version Damien Mattei
2016-04-29 15:53 ` Per Bothner
2016-05-02 10:22   ` Damien MATTEI
2016-05-02 14:27     ` Per Bothner
2016-05-03  9:30       ` Damien MATTEI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).