Post details: Java virtuals

3 June, 2008

Permalink 18:48 UTC, by Petteri R Email , 203 words, 466 views   English (US)
Categories: Gentoo

Java virtuals

Currently we have packages like sun-jaf that are reference implementations for a JSR and have since been incorporated into the JRE (>=1.6). So before introducing Java virtuals ebuild developers had to either depend on sun-jaf or a new enough JDK version. Tomcat used the java5 use flag to select between the two options. This of course is not ideal for users and as such we added support for virtuals into java-config. We are still in the early stages of converting stuff to virtuals and let's see how it takes as the work is quite boring. Any way here is a demonstration of the jaf virtual in use:

betelgeuse@pena ~ $ GENTOO_VM="sun-jdk-1.5" java-config -p jaf
/usr/share/sun-jaf/lib/activation.jar
betelgeuse@pena ~ $ GENTOO_VM="sun-jdk-1.6" java-config -p jaf

betelgeuse@pena ~ $

jaf was introduced in 1.6 so in the first case you need the separate package and in the second case there is no point in polluting the classpath with extra stuff as we already have it in the JDK. On the ebuild side you use the same functions as with normal packages but you have to add the --virtual parameter to java-pkg_jar-from and java-pkg_getjar calls so that they don't record individual jars.

Trackback address for this post:

http://planet.gentoo.org/developers/htsrv/trackback.php/1533

Comments, Trackbacks:

No Comments/Trackbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

Petteri R

October 2008
Mon Tue Wed Thu Fri Sat Sun
<< <     
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Search

Categories

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 59

powered by
b2evolution