Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#2554 - Java web start doesn't work

Attached to Project: Arch Linux
Opened by Dusty Phillips (Dusty) - Tuesday, 12 April 2005, 17:19 GMT
Last edited by Judd Vinet (judd) - Friday, 15 April 2005, 00:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jason Chu (jason)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This issue has been discussed here:

http://bbs.archlinux.org/viewtopic.php?t=11205

Basically, the Java webstart system that comes with the JRE is not working correctly, yet it is not showing any errors or log messages. It runs and does nothing, showing no output, but does not close. People who install local versions of the JRE seem to find that JWS works. Installing webstart manually also seems to solve the problem.
This task depends upon

Closed by  Jason Chu (jason)
Thursday, 21 April 2005, 03:34 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with version 1.5.0_02-1
Comment by Jason Chu (jason) - Friday, 15 April 2005, 02:03 GMT
This is because I stripped out the stuff to activate java web start. I did that because it needed lots of modifications to the local user's home directory.

If someone wants to work out the technical problems, I'll change it.
Comment by Andy Roberts (arooaroo) - Friday, 15 April 2005, 08:37 GMT
Can you recall more precisely what the "technical problems" were? For example, what modifications to the user's home directory? I've installed WebStart separately, and only changes I noticed were the changes to .mime.types and another file that I can't recall!
Comment by Jason Chu (jason) - Friday, 15 April 2005, 13:52 GMT
Any changes to user's home directories are difficult from a package. We try not to do them in general in any packages because we don't want to screw up the user's settings.

Also, removing them is more difficult than adding them.
Comment by Andy Roberts (arooaroo) - Friday, 15 April 2005, 16:04 GMT
I understand that :) I was specifically after the "lots of modifications" that web start makes, if it's possible for you to recall. I only spotted two when I installed, although admittedly, I wasn't really looking.
Comment by Dusty Phillips (Dusty) - Friday, 15 April 2005, 16:08 GMT
If we know what modifications need to be made, we can write a separate configurator script that can be run by the user -- it doesn't have to be packaged with j2re, but it should at least be available.

I'll take a look at the PKGBUILD when I have time, but its possible that won't be for two weeks.
Comment by Jason Chu (jason) - Friday, 15 April 2005, 16:09 GMT
If you have the install script (like within the .sh file you can download), you'll see all the stuff that I moved over into the PKGBUILD. You'll also see the stuff that I didn't move over.

I don't remember the modifications exactly.
Comment by Jason Chu (jason) - Friday, 15 April 2005, 16:09 GMT
I do like Dusty's idea.
Comment by Dusty Phillips (Dusty) - Friday, 15 April 2005, 17:46 GMT
Ok, here's what I found out:

The install script simply adds the following line to /etc/mailcap:
application/x-java-jnlp-file;/opt/java/jre/bin/javaws %s

and this line to /etc/mime.types:
application/x-java-jnlp-file jnlp

I can't find anything else that it does differently from the PKGBUILD, but something MUST be missing.

I've searched the net, and found that some people recommend setting a JAVAWS_HOME variable. I tried setting this to /opt/java/jre/javaws and /opt/java/jre/lib/javaws; neither solution worked.

Finally, I found that if you add:
/opt/java/jre/lib/javaws.jar:/opt/java/jre/lib/deploy.jar

to your classpath and then run:
java com.sun.javaws.Main http://path/to/jnlp/file

javaws works. The two links in my forum post, however, do not work, as they appear to be set up for jre 1.4.

So, basically, I can't figure out why the javaws binary isn't working. There is a workaround here; we could make javaws a script that runs the above java command, for example.

I'm also cautious about another possible problem. I would have thought that any jars in /opt/java/jre/lib should automatically be available on the CLASSPATH. However, I have to add them manually to get them to work. I had this same issue with tools.jar a few days ago. Is this typical behavior, or a problem with the Arch j2re install? Its possible this problem is affecting the javaws issue.

Would there be any way to run the java installer and remove unwanted files instead of trying to mimic the wanted portions in the PKGBUILD? That might solve a lot of these problems.

Dusty
Comment by Jason Chu (jason) - Friday, 15 April 2005, 18:30 GMT
Any changes to the install script will result in an invalid file that won't be installed.

I swear there are changes in the executing user's home directory along with it.

I found no easy way to get the install script to not do the crappy stuff I didn't like, that's why I wrote the PKGBUILD that way.
Comment by solsTiCe (zebul666) - Sunday, 17 April 2005, 17:57 GMT
why can't you simply use the .bin file instead of the rpm.bin ????

You like to add unnecessary dependances on the making of the package ?
And it is simplier to make a package with the bin ...

go grab that PKGBUILD that work for javaws: (my FAI's ftp is down so look at the file below)
and there is no need to change anything in the user Home to make javaws work ...

Maybe you would not have any trouble if you have used the .bin file directly instead of freaking with that rpm.bin ...

================================
pkgname=j2re
pkgver=1.5.0_02
pkgrel=1
pkgdesc="Sun's java runtime environment"
url="http://java.sun.com"
depends=( 'gcc' 'glibc')
source=(http://public.planetmirror.com/pub/java-sun/J2SE/5.0_01/linux/jre-1_5_0_02-linux-i586.bin j2re.profile)
md5sums=('1c9b3bb9670df5ebb5587d2bcba73b3c' 'db15944259ad567f7857a4b62255ba72')

build() {
mkdir -p $startdir/pkg/opt/java
cd $startdir/pkg/opt/java
echo "yes" | sh $startdir/src/jre-1_5_0_02-linux-i586.bin
install -D -m 755 $startdir/src/${pkgname}.profile $startdir/pkg/etc/profile.d/${pkgname}.sh
mv jre${pkgver} jre
rm -r jre/man/ja*
find -name "man/man1/*.1" -exec gzip -9 {} \;
for i in jre/*; do
if [ -f $i ]; then rm -f $i; fi
done

mkdir -m 755 $startdir/pkg/opt/java/jre/.systemPrefs
touch $startdir/pkg/opt/java/jre/.systemPrefs/.system.lock
chmod 644 $startdir/pkg/opt/java/jre/.systemPrefs/.system.lock
touch $startdir/pkg/opt/java/jre/.systemPrefs/.systemRootModFile
chmod 644 $startdir/pkg/opt/java/jre/.systemPrefs/.systemRootModFile

mkdir -p $startdir/pkg/opt/mozilla-plugins
ln -s /opt/java/jre/plugin/i386/ns7/libjavaplugin_oji.so $startdir/pkg/opt/mozilla-plugins

}
=================================
export J2REDIR=/opt/java/jre
export PATH=$PATH:$J2REDIR/bin
export MANPATH=$MANPATH:$J2REDIR/man
# that variable is not necessary
#export CLASSPATH=$CLASSPATH:$J2REDIR/lib
if [ ! -f /etc/profile.d/j2sdk.sh ]; then
export JAVA_HOME=/opt/java/jre
fi




Comment by Jason Chu (jason) - Sunday, 17 April 2005, 18:03 GMT
Have you tried doing that build as a user instead of root? There files in the root filesystem that are modified and I couldn't find a way to not have them modified. That's why I used the rpm. I did spend about a day trying to get it to build with the .bin, but eventually I gave in and had to use the rpm because it wouldn't run the install scripts and I could control what modified where.

Have you ever tried installing your package on someone else's machine to see if javaws works there? Or have you just been testing on the machine you built on?

I don't really appreciate the implication that I didn't have due diligence.
Comment by solsTiCe (zebul666) - Sunday, 17 April 2005, 18:11 GMT
well i am sorry if you take offense

i build my package as a user but with fakeroot i use USE_FAKEROOT="y" in makepkg.conf and got no pb to run the script ... and no files are modified in the / filesystem

i can't test it in somebody else machine sorry ..
Comment by solsTiCe (zebul666) - Sunday, 17 April 2005, 19:21 GMT
the PKGBUILd above is wrong. it needs
makedepends=('fakeroot')
to work
I apologize Jason. i wouldn't have said that, that way
Comment by Dusty Phillips (Dusty) - Sunday, 17 April 2005, 21:28 GMT
zebul666 is wrong. If you run his pkgbuild inside of fakeroot, it still installs files mailcap and mime.types inside the user home directory. I just tested it.

However, I am reasonably sure that I know how to fix the script so that it doesn't do this. I'll experiment it this afternoon and tomorrow and get back to you. I can incorporate my changes when I take over these packages next month.
Comment by Dusty Phillips (Dusty) - Sunday, 17 April 2005, 23:02 GMT
got it fixed... just doing some testing, updates. working on the jdk PKGBUILD too.
Comment by Dusty Phillips (Dusty) - Monday, 18 April 2005, 01:27 GMT
Ok, I just attached the PKGBUILDs, patches, install, profile, etc to this bug report. They work for me. Anybody else want to test?
Comment by solsTiCe (zebul666) - Monday, 18 April 2005, 07:43 GMT
yes that works fine. i thought that the change of $HOME/.mailcap and $HOME/.mime.types was not an issue. I tested my package by removing them

well either with my PGBUILD or either yours (dusty), i can launch one time an app with javaws but the second time i got a segmentation fault. don't know if it is the app (cgoban2 from kgs not the package that is outdated) or javaws that has a pb. anybody has that too ?
Comment by Dusty Phillips (Dusty) - Monday, 18 April 2005, 16:29 GMT
Actually, after rebooting overnight, I can't get ANY jws apps to work; they are all segfaulting on me. I can't imagine why, but I just realized that I didn't test the jws after updating the jdk. Maybe its something like that. I'll investigate some more.

Dusty
Comment by Dusty Phillips (Dusty) - Monday, 18 April 2005, 17:07 GMT
Ok, it turned out no java apps were working at all. I think I must have bjorked my install when I was testing the packages. When I recompiled and reinstalled my packages from scratch, they worked flawlessly. I'm betting that the jws app you're running is the problem -- do the demos at http://java.sun.com/products/javawebstart/demos.html work for you?

Dusty

Loading...