Closed Bug 65132 Opened 25 years ago Closed 24 years ago

Java console menu item does not appear disable initially in java plugin's absence

Categories

(Core Graveyard :: Java: OJI, defect, P3)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: shrir, Assigned: bugzilla)

Details

Observed during verification of 61474 Steps: 1 Install mozilla without the java plugin 2 Go to "Tasks|Tools" menu 3 Observe that the "Show Java Console" menu item appears enabled 4 Clicking on that menu item does nothing and closes the menu. Revisiting the menu shows the item disabled Expected: Since the java plugin is absent, the menu item should never appear enabled
Hi, Blake: Using "oncreate" instead of "onclick" has solved that problem. I don't think only after you click the Task menu, you can see java console is disabled.Ues onclick may cause that problem but not with oncreate. Am I lost here? I am scared. Xiaobin
Hmmm...shrir do you still see this in a new build with a new profile?
yeah, still see this on today's trubk (0122) and with new profile and on noth skins (mod + classic)
Shrirang: How do you go to Task->Tools, click Task or move the mouse to there? I used both methods to go to Task -> Tools and see java console is disabled.
hmm...I click on Tasks and move the mouse on to Tools which opens up the submenu and still shows me the java console menu item enabled (windows trunk ) :(
Shrirang: Can you make sure you really don't have plugin installed by go to java.sun.com or move the plugins directory to other directory? Thanks!
No, there's definitely a problem here. I've seen it.
sigh !!
xiaobin, your function works fine if I have the 'java plugin enabled' preference disabled in 'Prefs|Advanced' setting. However, this pref is always ON by default when you launch the browser(with a new profile). So , gJVMMgr.JavaEnabled() is just checking for this pref. I would like to look for something that actually checks if there is a jvm installed or running on my system and then pass it's value to get the correct answer (no matter if the pref is ON or OFF initially). nsIJVMManager.idl however does not list any function that actually serves this purpose. What do you think ?
Shrir: Even after I checked the "Enabled Java" in Pref->Advanced as you know and removed the Java Plugin,I still have my expected result(the java console becomes grey). I tested using Mozilla 0.7 and code from trunk checked gays ago, both are correct. Actually the nsIJVMManager.idl have a method called IsJavaEnabled which checks both you preference setting and JVM installation, if either one is missing, it will return false. The method implemented in nsIJVMManager.cpp(modules/oji/src) looks like: NS_METHOD nsJVMManager::IsJavaEnabled(PRBool* outEnabled) { nsJVMStatus status = GetJVMStatus(); *outEnabled = (status == nsJVMStatus_Enabled || status == nsJVMStatus_Running); return NS_OK; } I have tested this function with four kinds of combination(Java prefrence enabled and JRE installed),only both conditions are satified, then it returns true. Please test with Mozilla nightly build and I can see it also work.
Xiaobin, there definitely is a problem -- I've seen it as well. But it's likely with the firing of the oncreate handler, not ::IsJavaEnabled().
Blake: I used to use oncreate instead of onclick to fix last bug. I can observe this when I used onclick. But after I changed to oncreate, I never see this. Can you tell me some steps to see this bug. Thanks! Xiaobin
The only time I saw this is: When you do not have java plugin installed and java is not enabled first. When you enabled java at this time, if you go to java console, you will see it is not greyed out because the javaEnabled at this time returns true. Click again makes the java console become grey. I think you need to restart the browser each time you change the java preference. This is also required by MSIE.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.1
Shrirang: Would you like to verify this with latest trunk?
ya, i will...(status still ASSIGNED)
Shrir, so you still see this or not?
guys, this looks fixed on the trunk on windows and linux (0502). Works as required : item grayed out if java not installed ( never apepars highlighted on the first instance).
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
self verifying...
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.