Java Applets don't run correctly on Mac any more. On Windows everything is correct. 3 months ago it was also working perfect with mac.
I call a Java class from JavaScript in HTML-Code. The JavaScript get loaded earlier then the Java Applet. Even the Java Applet-Tag is on the top. When I have a button in HTML to start the Java-class with JavaScript, it works. But it should also be possible to do that right after loading die Java Applet. Until 3 months ago it was working always properly on Mac with Firefox for 6 years. On Windows it still works perfect with Firefox. And it worked always perfect on Windows with Internet Exlorer and Chrome. I hope you can solve this problem. With Safari Java Applets don't run any more even Java is active in Safari. So my customers have just Firefox to work with on Mac. Chrome doesn't work on Mac. Here is my Code. The Applet is signed by symantec:
<html> <head> <applet code="testmacsigned.class" archive="testmacsigned.jar" width="0" height="0" mayscript name="testmac" id="testmac"></applet> <title>Offline Reservation hellocut</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!--<object type="application/x-java-applet" name="testmac" id="testmac" width="10" height="10"> <param name="archive" value="testmacsigned.jar"> <param name="code" value="testmacsigned.class"> <param name="mayscript" value="yes"> <param name="scriptable" value="true"> </object>--> <!-- <embed code="testmacsigned.class" type="application/x-java-applet" archive="testmacsigned.jar" mayscript name="testmac"> <noembed> No Java Support. </noembed> </embed>--> <script language="JavaScript"> <!-- function fctapplet(){ window.document.testmac.testmacsigned(); } --> </script> </head> <body> <table> <tr> <td> <input type="button" onClick="javascript:fctapplet();" value="go"> </td> </tr> </table> <table> <tr> <td> </td> </tr> </table> <script language="JavaScript"> <!-- window.document.testmac.testmacsigned(); --> </script> </body> </html>
The last command - window.document.testmac.testmacsigned(); - doesn't work anymore because the Java Applet on the top isnt' loaded allready.
Muokattu
Kaikki vastaukset (20)
Hi..
i enabled logging etc. It shows Console now with lot of debugging information. Chrome it doesn't manage to load. I am attaching screenshots for Safari & Firefox. They both show : basic: Applet made visible basic: Applet started basic: Told clients applet is started
I realized a fact that in case of Safari it says something about : security: LiveConnect (JavaScript) blocked due to security settings. security: LiveConnect (JavaScript) blocked due to security settings. This is not shown in case of Firefox. I think this is what is blocking your first1_6. You need to check this specifically.
The same messages were given by BoB also. And now I have a real bad news for you. My BoB stopped working automatically all of sudden :( what that should be now??
hey hey...
it stopped all java applets on all browsers. Then i went to system preferences > java. I stopped the console thing. Made it hidden. Unchecked all 3 checkboxes. Still didn't worked. Then i cleared all temporary internet files from that java control panel (not from browser.) There is option to delete all cached and pre-installed applets. And when i did this and restarted Safari, it doing things perfectly. I can now login to BoB again! And best part is, it's working on Chrome as well!!
Now i have another advice for you (sorry for this over-smartness of mine..) i think BoB has developed and compiled that applet for 1.6 and not for 1.7 and hence maybe its working fine even on Chrome.. do u think so??
Hi vinay
Great, thanks a lot. The thing because of stopping all Java applets and clearing all temporary Internet files I knew and I did this on the mac of my customer always. But BOB didn't work with all Browsers even I was deleting all Internet files in Java. Why BOB works with Chrome in your case is very strange because Java can not work on Mac 64-bit with Chrome. you can see here the official statement of Java: http://java.com/en/download/faq/chrome.xml . I'm still almost sure that in your case there is Java 6 in the background from earlier times when you were working with Mac OS 10.6. I know in Systempreferences -> Java there is just 1.7.0_25. But the Version 1.6 was never written there. It can be in the background. But anyway back to my applet. Go to Systempreferences -> Java -> security . The start of an Applet from Javascript is just possible with the security Level high. That's because it was not working in Safari and also not in Firefox. How is it in your Java? very high? Could you put this just for testing to high? And start my applet in Safari and Firefox again? That would be great.
http://www.hellopage.ch/test/testapplet/testmacsigned1_6_click.htm
Maybe you hided the Java Console again. you have to put it on again in Java -> Advanced -> Console. If BOB doesn't work anymore you know, you can delete all Internet Files in Java:-) We have more and more experience:-)
Muokattu
My security is now set to high. Firefox still no luck. Same thing. Not with BoB either. Safari YESS. It says 'network: Created version ID: 1.7.0.25' whenever i press that 'go' button.
I tried setting security to Medium. Still exactly the same. I am not able to upload the screenshot this time.. some mozilla problem.
But i tried something for you and its really giving me headache : macbook:~ vinaysamant$ java -version java version "1.6.0_51" Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509) Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode) How can it show 1.6?? Something really happening here on my macbook
i think u try this http://support.apple.com/kb/HT5559
build 1.6.0_51-b11-457-11M4509
This is because I built it with Java SE 1.6. So it's everything fine with your Computer.
When there is just Created version ID: 1.7.0.25 on Safari then it doesn't really work. It should write also "first 1_6".
Try now this link. I built this with Java SE 1.7. This is the most actuel Version of Java:
http://www.hellopage.ch/test/testapplet/testmacsigned1_7_click.htm
Click "go" and then it should write always Created version ID: 1.7.0.2 and also "first". I think this time you will see the word "first".
But you have to delete first the Internet files in Java because with Java 1.6 I think everything get blocked. Mac OS did this because of security reasons
Muokattu
I'm a Windows user, so I can't test this directly. (When I try the go button, I get an error "uncaught exception: Liveconnect call for Applet ID 3 is not allowed in this JVM instance".)
However, if the problem is making sure that a script does not error out by trying to access a method or property of a nonexistent object, then the solution is to wait until the object exists. In principle, there are two approaches:
- use a load event on the object to trigger the script - for example, this works with an <img onload="myfunction();">, but I don't know whether this is possible with a Java applet
- use window.setTimeout() - for example:
function appletgo() { if (typeof window.document.testmac.testmacsigned) == "function" window.document.testmac.testmacsigned(); else window.setTimeout(appletgo, 500); }window.onload = appletgo();window.onload = appletgo;
I'm not sure "function" is correct, that's just a guess based on use of parentheses. Could something like this work?
Edit: Corrected an error in the assignment of the event handler. Using parentheses causes the function to run immediately, which is the opposite of what I wanted.
Muokattu
Hi jscher2000
Thanks for your answer. With all Windows XP, VISTA,7,8 it works everything fine. Maybe you have the security-level very high? With the security-level very hight it's not possible to call an applet class with JavaScript. So you have to put it to the level high. Then it works for sure.
Or it could be that you have still installed Java jre 6. I built this Applet with Java SE 7 so it just works with jre 7.
There is just a problem with a fully updated Mac and especially in combination with Firefox. And even there this was working always the last 7 years until 2 or 3 months ago. The thing because of the timeout I tested already 2 weeks ago on Mac. But this doesn't make any difference. Firefox-Browser waits antil the timeout is finish and then the Applet starts to load. It should be the opposite. It's really a bug of Firefox.
Muokattu
Hi firefoxproblemonmac, the loop I suggested reschedules the timeout every half second until it can connect with the applet. Do you mean that this will prevent Java from ever starting the applet? That sounds like a bug...
Hi jscher2000
Thanks for your help. To test it with timeout I did this:
var strdate = new Date(); var curDate = null; do { curDate = new Date();} while(curDate-strdate < 10000);
Normally it should have the same effect like your kind of Timeout. But maybe with your Timeout the Applet-Tag continues between the break. I will test it next monday because now I can't call my customers.
This line doesnt work: if (typeof window.document.testmac.testmacsigned) == "function"
I tested it on Windows. JavaScript can not get the value function from an Applet class. There is just the value "unknown" even the class exists and works. But I will test it like this. That's the same:
function fctapplet(){
try{ window.document.testmac.testmacsigned();} catch(e){ window.setTimeout(fctapplet, 500); }
}
I will tell you the result. But even it will work like this, it is a bug of Firefox. But I would have at least a work around.
Muokattu
If you think that is a Bug in Firefox, file a Bug report!
https://bugzilla.mozilla.org/
https://developer.mozilla.org/en/Bug_writing_guidelines
Hi the-edmeister
Thanks to suggest me that. But I did this and I was landing here. In the beginning of this thread you see, that even somebody from bugzilla was answering me. But then I didn't hear anything anymore.
I don't think it's a bug. It is a bug for 100%! But just Firefox with Mac OS. Firefox on Windows works properly. Everything is 100% up-to-date (Java,Firefox,Mac OS). And 3 months ago it was working with Mac OS perfectly for almost 7 years. I work for CoiffureSuisse an Organisation who is responsable for all the 12'000 hairdressers in Switzerland. With Mac OS they can't work anymore because Java Applets don't run correctly on Mac OS since 2 months. In the next Magazine we will suggest all this hairdressers to change from Mac OS to Windows. On Windows it works everything fine with Internet Explorer, Chrome, Firefox, Opera.
Muokattu
Hi jscher2000
I could reach a customer and I was testing your timeout. It doesn't work. When the Applet-Class get called during the built of the html the Applet is not definitely loaded. And then the Applet crashes and can not get called even after loading the total html. When I call the same html-page without calling the Applet-class directly in the page, it works. I can press afterwards to the button "go" and it does everything it should. With the same browser Firefox and with the same Mac.
@vinay.samant It's the same problem with www.bobibanking.com. That's the biggest bank of India. I deleted in Java all Internet files and applets. I tested this again with an other new Mac from an other customer. With a new Mac 10.8.4 it's not possible to Login in the biggest bank of India. Neighter with Safari, Chrome and Firefox. With Windows and Linux everything works fine with all the big browsers.
Muokattu
Hi,
I think Apple, Java/Oracle, Mozilla & Google are all crazy and all you Java Followers are also crazy. Let me explain :
- Have a look at my screen shot.
- I have latest Mac OS X Mountain Lion 10.8.4 on Intel Core i5. This is 64bit.
- Then i should not have Chrome Running 'Ideally' but its running, perfectly fine on though it's 32Bit!
- I should have only one version of Java/JRE as per Java-Oracle. You can see my terminal window which shows Java SE version 1.6.0_51 when i run 'java -version' command on terminal. I actually updated my PC's Java using Apple Software Update and you can see 'Java Control Panel' showing 'Java 7 Update 25' in their official control panel. Java says, when you install 1.7, then it overrides 1.6, but somehow my Mac is an exception.
- But it's good exception, which we need to detect how, because so called 32bit Google Chrome runs perfectly on my laptop (64Bit i5 Mountain Lion) and now only this but it refers correct version of Java (mostly 1.6 somehow) and runs BoB Applets perfectly fine. Entire BoB is in JSP/Applets and you can see my control panel after login including my current balance etc. Thats confidential information, and please treat it that way.
- This runs perfectly on Safari as well due to seamless integration of Apple.
- Now the question is, whats wrong with Mozilla Firefox? What is that Safari, IE & Chrome manage to do but Mozilla Experts fail to understand about Java Oracle?
- And bigger question is, in this world of 3Tier Architecture, MVC & Tab Revolution of Android, what's that make you (java lovers) and BoB depend HEAVILY upon applets when you have other options...
Hi vinay.samant You made a very good summary of everything. I'm almost sure BOB-Login just works in your case because there is still Java 1.6.51 on your mac. But when you buy a new iMac Java 1.6. is not installed and it's absolutely not possible to install 1.6. You just can install 1.7_25. And Chrome doesn't work with this. That's why you couldn't Login BOB with Chrome. But also with Safari and Firefox you wouldn't be able to Login BOB with iMac.
I'm not a Java follower. BOB shows that there is a need for Java. The technicians are not stupid at BOB. I would like to talk with you about the alternative. But first I would like that you test this link with all Browsers:
http://www.hellopage.ch/test/testapplet/testmacsigned1_7_click.htm
When you have Java-Security-Level high it should work at least with Firefox. You have to Click to "go" and there should be the text "first" in the Java Console. Could you test this please?
Muokattu
Hi vinay-samant
I know why you still have Java 1.6.51 on your mac. When you bought your mac you had Mac OS 10.6 or lower. Until the Version of Mac Os 10.6 Java was fully integrated on Mac. With Version 10.7 and later Java isn't integrated on Mac anymore. But you still can install it from Java. And because on your Mac Java 1.6 is fully integrated from the beginning it will stay there forever. That's the only reason BOB works in your case. Don't try to uninstall Java 10.6, otherwise you can't Login to BOB anymore. This is a bug of Safari and Firefox or it's a fundamental bug of Mac. Because this bug just happens on Mac. On Windows and Linux it works properly.
Muokattu
I tested ur applet in all 3 browsers. Works in Safari. But doesn't show that 'first' string (ever..) Doesn't work in Chrome. Typical java problem of 32Bit. Works in Firefox. Doesn't show that version message & 'first' either. My java security is High (minimum recommended).
I m sure BoB must have had some strong reason to select Java, and all other banks. But let me tell you one more thing, these all high-profile (bank like) applications are developed by big companies like Wipro, InfoSys, TCS who has corporate tie-ups with Microsoft, Oracle, IBMs and hence they always promote these technologies. These applications are installed on Windows Servers with IIS & SQL Server, which are surely the worst combination for web-hosting. At moment our railway department IRCTC also caters entirely windows based solution for online booking. If they just shift their logic to LAMP, they will experience double speed, higher response and better customer satisfaction. And they know this, but they won't do it because they are stuck with microsoft forever. But are you?? Think of this.
World's #1 Server : Linux. Highest Use Desktop : Apple (Unix) Highest Used Browser : Firefox Mobile OS : Android (Linux) World's No 1 Web Scription : PHP World's #1 RDBMS : MySQL (Now Oracle MySQL) Biggest IT Organizations : Linux, Apache, Mozilla!! All OpenSource is dominating proprietary systems. Corporates are forced to follow Microsoft, Google, IBM, Oracle, Apple due to their policies. But we don't have to. Think of it. You always have alternative.
If you are specifically using applet for live interaction then JQ & JQUI are very solid alternatives. If Security then HTTPS & Hashing are already there. All other features are common in all scripting languages. And java is very resource hungry and proprietary. PHP is opensource, light weight, highly extensible, platform independent.. google to see more features. Linux Apache MySQL PHP JQuery is suppose to be next thing happening in IT. Think about it...
Thanks for the test. It's strange it doesn't wirte "first" with Firefox. Because with iMac and Firefox it works when I press the button "go". It just doesn't work when I write out the Text "first" in the same time when the html is loading. But we let this now. I know that BOB has the same problem so the problem on Mac with Java is worldwide. It's very strange that Apple doesn't know this. They will loose many customers like this.
So I would like to know the alternatives. As you know I'm programming a booking System for hairdressers since 7 years. In case the Interntconnenction in the Salon of the hairdresser doesn't work there is an offline-bookingsystem. In case the Internet doesn't work, they can open the offline-booking in a Browser like Firefox, Safari, Chrome, Opera or Internet Explorer and the appointments are visible and they can also book offline new appointements. As soon the Internet works again it makes automaticely a synchronisation. And this offline-booking and the Synchronisation I did with Java. Everything who runs online works perfectly with Mac and also with Iphone, Smartphones whatever. Even now because there is no Java. The Problem is this offline-booking since 2 or 3 months. I did this offline-booking 7 years ago. The big advantage with Java is, i'm programming it 1 time and it works on Windows, Mac OS and Linux. Is there any other programming language who works on all operating Systems? Beacause I never will programm specially something for Mac or Windows or Linux or whatever. This have to be 1 programming language. I just know Java who can do that or am I wrong?
Muokattu
I have already answered your question about alternative.
If you are specifically using applet for live interaction then JQ & JQUI are very solid alternatives. If Security then HTTPS & Hashing are already there. All other features are common in all scripting languages. And java is very resource hungry and proprietary. PHP is opensource, light weight, highly extensible, platform independent.. google to see more features. Linux Apache MySQL PHP JQuery is suppose to be next thing happening in IT.
But this is not place for debate about OS. If you can share your skype/yahoo ID then we can chat and i can really give you good alternative. If it's booking system then i have already developed one for Hospital Rooms. And i used 'PHP-Ajax'. It's 100% online, lightweight and 'client independent' works in 'ANY BROWSER' & 'ANY OS'. Over and above, it works on any browser on any Tablet/Smart Phone also. So when my client want to start another center or employ another employee (support or doctor) he dont have invest 45000/- for PC and create space. He has to just give him one Tab worth 6000 and login details, and his new executive is immediately online!
It's 'server independent' also as it can be hosted on Linux, Windows or Mac. So you can continue with your existing ISP/HSP. It's being scripting, HTML5, CSS3 based lightweight application, it's very easy/fast to upload, alter, backup and restore. Entire logic is RDBMS dependent and hence Backup, Sync & Restore is very easy. It's being 3Tier & MVC, you can easily change backend & front end and keep the application as it is.
my skype and yahoo id is vinay.samant. Let me know yours..
PHP or Jsp or aspx and so on is not very important at the Moment but later for sure. First I need something to replace Java Applet. You have to understand that I just know my technoligies. I Need time to understand the other Technologies. I think the keyword is JQ & JQUI to replace Java Applet. I study in Internet now what is JQ & JQUI exactly. If it works on Mac, Windows and Linux it would be perfect. The first question is: Do my customers Need something to install that JQUI works. Or is it preinstalled on all Operating Systems allready? I send you a mail to yahoo and an Invitation to Skype. It's better to talk there. I'm very glad you are helping me!