Bug 465531
Summary: | unable to run java applets from firefox on fedora 10 x86_64 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Donald Cohen <don-redhat-z6y> | ||||||||||||||
Component: | java-1.6.0-openjdk | Assignee: | Deepak Bhole <dbhole> | ||||||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||||
Priority: | medium | ||||||||||||||||
Version: | 10 | CC: | gecko-bugs-nobody, langel, lkundrak, mcepl, mjw, walters | ||||||||||||||
Target Milestone: | --- | ||||||||||||||||
Target Release: | --- | ||||||||||||||||
Hardware: | x86_64 | ||||||||||||||||
OS: | Linux | ||||||||||||||||
Whiteboard: | |||||||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||
Clone Of: | Environment: | ||||||||||||||||
Last Closed: | 2008-12-12 04:23:19 UTC | Type: | --- | ||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||
Embargoed: | |||||||||||||||||
Attachments: |
|
Description
Donald Cohen
2008-10-03 18:35:03 UTC
Created attachment 319602 [details] ~/.xsession-errors Can reproduce with firefox-3.0.2-1.fc10.i386 and java-1.6.0-openjdk-plugin-1.6.0.0-0.21.b12.fc10.i386 looking at http://www4.passur.com/bos.html which displayed the page, but no airplanes (although it was 19:15 on Monday in Boston, so there should be a plane somewhere around) This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping I just upgraded to fedora 10 (and did yum update) I now seem to have firefox 3.0.4 It says it has the icedtea plugin. When I run from shell and try to start an applet I get the following output. ICEDTEAPLUGIN_DEBUG = (null) Initializing JVM... And there it hangs. Looks like something went wrong during installation. What does about:plugins say the Java plugin is? Also, can you paste the output of: 1. rpm -q java-1.6.0-openjdk-plugin 2. readlink -f /usr/lib64/mozilla/plugins/libjavaplugin.so 3. rpm -qV java-1.6.0-openjdk-plugin (assuming #1 shows a version installed) (In reply to comment #4) > Looks like something went wrong during installation. What does about:plugins > say the Java plugin is? IcedTea I see many lines containing IcedTea, starting with application/x-java-vm IcedTea class,jar Yes application/x-java-applet IcedTea class,jar Yes application/x-java-applet;version=1.1 IcedTea class,jar Yes > Also, can you paste the output of: > 1. rpm -q java-1.6.0-openjdk-plugin > 2. readlink -f /usr/lib64/mozilla/plugins/libjavaplugin.so > 3. rpm -qV java-1.6.0-openjdk-plugin (assuming #1 shows a version installed) # rpm -q java-1.6.0-openjdk-plugin java-1.6.0-openjdk-plugin-1.6.0.0-8.b14.fc11.x86_64 # readlink -f /usr/lib64/mozilla/plugins/libjavaplugin.so /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/IcedTeaPlugin.so # rpm -qV java-1.6.0-openjdk-plugin (no output) (what output did you expect?) Everything appears to be correct (the last command gives output only if something is wrong). Can you try it again -- close all firefox instances, and start it from a console as: ICEDTEAPLUGIN_DEBUG=true firefox and send me the resulting log, and the /tmp/java.std* files (assuming any are created)? Created attachment 326585 [details]
shell transcript
comments are in the transcript
Created attachment 326586 [details]
the file name says it all
(why must I add a comment?)
Created attachment 326587 [details]
transcript of shell containing comments, saved as plain text
Created attachment 326588 [details]
java.stdout
Created attachment 326589 [details]
java.err
Ignore the two files automatically misinterpreted as binary. I wanted to comply with the request to post the resulting log (transcript) and the two java.std* files- these are the last 3 attached files. Hmm that looks okay too. So what happens after that last line in the log (... GetJavaObject ...). It just hangs? Now that I have rebooted from the crash I thought I should try it again and it works. So I think this is a different bug. However, I do still have a related question - how can I get a java console? I am not aware of any way to show the console in Firefox > 3.0. Do you need the console for debugging an applet? If so, you can start firefox as 'ICEDTEAPLUGIN_DEBUG=true firefox' , and that will start the underlying vm with a debug server, which can then remotely debug via port 8787. (In reply to comment #15) > I am not aware of any way to show the console in Firefox > 3.0. Do you need the > console for debugging an applet? If so, you can start firefox as yes, exactly > 'ICEDTEAPLUGIN_DEBUG=true firefox' , and that will start the underlying vm with > a debug server, which can then remotely debug via port 8787. You mean like telnet localhost 8787 or http://localhost:8787 ? Neither of those seem to work. Where can I find some doc on this? I was not even aware of any such shell syntax as the command above. No, that is for debugging, it will only work when attaching a debugger. What is it that you need the console for? Do you need to debug an applet, or do you need to monitor it's output? (In reply to comment #17) > No, that is for debugging, it will only work when attaching a debugger. What is > it that you need the console for? Do you need to debug an applet, or do you > need to monitor it's output? I'd at least like to see the console output - that's where I tend to write debugging info. If I can do more, that would be even better. What is the protocol for connecting to that port? What tools know how to do that already? (I'm guessing eclipse?) And back to my original question, where's some doc for all this? Nope, there are no docs for it atm :/ Okay, so if you just want to monitor output, it is much simpler. Just start firefox from console with the ICEDTEAPLUGIN_DEBUG=true .. and then monitor the /tmp/java.stdout and /tmp/java.stderr files. That is where stdout and stderr from the applet will go. If you do wish to debug, you can start firefox with ICEDTEAPLUGIN_DEBUG=true, and attach a debugger to the underlying vm. To do that: 1. Start firefox from console as ICEDTEAPLUGIN_DEBUG=true firefox 2. Go to the page where the applet is, and let it load. 3. Load your applet project in Eclipse and open it 4. Go to Run->Debug Configurations 5. Double-click "Remote Java Applications" in the listbox on the left 6. Provide a name and make sure the right project is selected, and set the Port to 8787 (default is 8000). The rest of the items can stay at default (Connection type = Standard Socket Attach and Host = localhost). 7. Click apply to save it, and then click debug. From then on, you can you can debug the instances directly by going to Run->Debug History-><The name you gave in step 6> Thank you. But where do you find this info? And also tell me about the strange command line, and where you find this documented. I didn't find it anywhere. I am the IcedTea plugin maintainer, so I know the internals :) Well it ought to be documented somewhere so people like me can find it! I still want to know about the funky command line. Also, do you know where to find doc about how to control which java plugin is used by firefox, what parameters are passed, etc? There used to be a java control panel - what became of that? I see it on my FC6 machine but not in Fedora 10. Not that I ever understood how that communicated with firefox ... And, come to think of it, in Fedora 10 Alpha there was another browser, part of KDE I think, Konqueror ? All the same questions (if not more) apply to that. I want to find out how to try different combinations of browsers and java plugins. I know this is way off the original topic. I'll be happy to open another bug if you prefer. I also thank you profusely for all the help you have already given me. Until now I was the only user of the debug features, but there are more users now and you're right, it should be documented. Okay, I have added a note to my task list to create a wiki page with this info. What do you need to know about the commandline? The plugin used by firefox is determined based on what is in the plugins dir. Firefox first searches $LIBDIR/mozilla/plugins and then ~/.mozilla/plugins for available plugins. IcedTea plugin is set up via the alternatives system. /usr/lib[64]/mozilla/plugins/libjavaplugin.so is a link to a file in /etc/alternatives which ultimately links to IcedTeaPlugin.so distributed with the JVM. The java console option was removed from Firefox options a while ago. Sun's Java plugin allows showing of the Java console by checking the appropriate box in the plugin Control Panel. As for konqueror.. I had never tried it, but it (the plugin) doesn't seem to work with it for some reason. I have opened a bug against it: Bug #476091 > What do you need to know about the commandline? ICEDTEAPLUGIN_DEBUG=true firefox I always thought that the shell expected the first thing on the line to be the name of a program that is to be run, and the rest to be arguments passed to that program. If I do which ICEDTEAPLUGIN_DEBUG=true or which ICEDTEAPLUGIN_DEBUG or which ICEDTEAPLUGIN I get back the message that it's not found in my search path. So how should I interpret that line? And where's the doc that tells me that this is how any shell interprets it? I now see in man bash something called "variable assignment", which is not well described. Is that what this is? So the command is something like this? export ICEDTEAPLUGIN_DEBUG=true ; firefox Is there a list of such variables and what the possible values mean? For instance, perhaps this is how I can control the memory available to the JVM used for applets? How are you supposed to control that now? This sort of thing seems too important to be undocumented. ICEDTEAPLUGIN_DEBUG is a variable you are setting. When you tun "ICEDTEAPLUGIN_DEBUG=true firefox" on the command line, bash sets the variable ICEDTEAPLUGIN_DEBUG to value "true", and then starts firefox. Once firefox is closed, ICEDTEAPLUGIN_DEBUG is no longer set on the shell. If on the other hand you do "export ICEDTEAPLUGIN_DEBUG=true ; firefox", it will export the variable ICEDTEAPLUGIN_DEBUG and set it to true. This will work too, but then when you exit firefox, ICEDTEAPLUGIN_DEBUG will continue to remain set in that shell until you exit. As for controlling things like memory set aside for applets, that is not possible with the IcedTea plugin at this time. Besides, this is not something you should rely on any way. Even if there were a way to change those options, you can only make that change on your own machine, and not one anyone else's who might visit your page. I agree you can't count on other browsers to set it, but you can show users how much memory is left, tell them how much they need in order to do what they want to, and show them instructions for making that much available. At least you can do that for sun java plugins that use the java control panel. I'm guessing this is still available in windows, for example. Do you have an applet that is running out/can run out of memory, or is this hypothetical? In either case, you need to open a separate bug for it so I can track it via that and explore potentials ways to address this. In the mean time, I am closing this issue since it is fixed. If you have any further questions, please feel free to send a note to distro-pkg-dev.net -- that is the mailing list for IcedTea. Actually I do have an applet that tends to run out. In the past I've referred users to this page: http://www.duckware.com/pmvr/howtoincreaseappletmemory.html Given that all applets share the same VM, you're always in danger of running out because of what other applets do -- only one reason that I think someone was crazy to make all applets share the same VM. In general I think one needs control over all the various parameters that control JVM, and this ought to be possible on an individual applet basis. Of course, the fact that this is not supported is not YOUR bug. In any case, feel free to file a new bug for the ability to control memory and other parameters of JVM's created by browsers, and put me on the CC. |