Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Applet and JavaScript interaction in Safari

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

I am developing an embedded Instant Messenger for my client's site. It seems to be crazy but I've done it on a PHP Mysql site using Applet and Javascript.

It really comes a long way to do it and it doesn't work very stably. I've been able to make it work in IE, FF and Opera; However, in Safari 4, I've experienced the following problem:

java.net.MalformedURLException: no protocol:
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.checkLiveConnectCaller(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.access$000(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)

It wasn't only me having this problem who uses Javascript and Java. I've searched the web and every site who teaches how to use JS + Java has this error message in Console. So I guess it's something wired only in Safari 4.

So far, I can only think, the problem is because the URL doesn't have a "http://"; etc. as a protocol. "Javascript: " isn't a valid protocol that accepted by Java. Please let me know if I am wrong.

I need some help to guide me for this problem. Please.

Thanks

Morris
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is "the URL"? What is the code doing that is causing the exception?
 
Oh. Hi guys! Look at this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic