You are not logged in.

#1 2011-08-16 10:31:42

Giniu
Trusted User (TU)
From: Wrocław/Poland
Registered: 2007-04-02
Posts: 61
Website

java 5/6+7, dealing with multiple jre? (packages simplification idea)

Recently I found out that app I maintain does not and will most likely never work with current jre7 (because of "javax.swing.KeyStroke cannot be cast to java.lang.Comparable" exception that hurts many applications). Here I speak about XMLMind XML Editor (XXE), that is in two packages, one xxe that provides latest version for open source and xxe-std that provides old 3.5.2 version, that last one to allow commercial use, which made it a version of choice for multiple users, including that it is recommended by O'Reilly for all authors even today. The problem is that it is closed source, so one cannot modify it to update to latest version of Java, so running jre6 is only possible solution I can think of. This is only one app, and there can be more situations like that in future.

I looked at jre6 (orphaned now) and jre5 packages in AUR and noticed some things - first of all jre6 cannot be installed along the now current jre 7 because of file conflicts. The jre5 is put into /opt/java5/jre but adds itself into path (wrong path by the way) without modifying the file names, so if one have both jre and jre5, they have two "java" in same path (or would if the profile jre5 wouldn't point to jre 7, which can be missing in the first place). I think the situation needs a little cleanup.

How about making jre{5,6} install into /opt/java/jre{5,6} and not adding them to path (or without installing web browser plugins or stuff, just the content of /opt/java + license)? If some application needs to use jre 5 or 6, maintainer can use the full path to java or adjust the path for just the time of running the application. It would also simplify the jre packages themselves, and will make it possible to run older software one cannot update. Same could go for jdk, but I doubt that old jdk coexisting with new jdk is needed that badly as jre.

Because Java is used by a lot of people, I did not want to make this decision alone by adopting jre6 and rewriting this package to do what I described above, I decided it will be better to see if someone has anything against this or maybe even better idea how to deal with current java ...+5+6+7+... situation.


My GPG fingerprint: 7170 26A9 D477 9FC5 3940  7266 40F5 57B7 3149 6106

Offline

#2 2011-08-16 11:16:17

vlc
Member
Registered: 2011-04-12
Posts: 11

Re: java 5/6+7, dealing with multiple jre? (packages simplification idea)

I think It's a good idea. Some additional use cases:
- A java programmer needs multiple jres installed to test for compatibility.
- To compile android AOSP, you need jdk6. It does not accept jdk7 for now.

Maybe the packages could also provide /usr/bin/java{,c}{5,6} symlinks, a bit like python2.

Offline

#3 2011-08-17 11:43:21

Giniu
Trusted User (TU)
From: Wrocław/Poland
Registered: 2007-04-02
Posts: 61
Website

Re: java 5/6+7, dealing with multiple jre? (packages simplification idea)

So that's what I did - updated jre6 and jdk6 to 6u27, made them install into /opt/java6 (easier to avoid troubles, because jdk is installed straight into /opt/java) and created symlinks for java and javac as java6 and javac6. Seems to work, at least for my package (by simply substituting java to java6 in run scripts).

Last edited by Giniu (2011-08-17 11:56:16)


My GPG fingerprint: 7170 26A9 D477 9FC5 3940  7266 40F5 57B7 3149 6106

Offline

#4 2011-09-09 05:24:00

jcasper
Member
Registered: 2007-08-01
Posts: 14

Re: java 5/6+7, dealing with multiple jre? (packages simplification idea)

The jre6 and jdk6 package currently in the AUR install to /opt/java and conflict with the jre/jdk packages, they were apparently first submitted on 8/27.  So what happened to the packages mentioned here that install to /opt/java6?  (I understand why those in [community] are no longer there)

Offline

Board footer

Powered by FluxBB