This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Java - Applet doesn't work on Firefox when usign ForkJoinPool (while in Eclipse works)

 
Greenhorn
Posts: 5
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to everyone, I'm trying to realize an applet that has a portion of code parallelized.
When I run the following code on Eclipse (Luna, java vers=8), the code runs and pops-up the two errors messages. On the other hand, when I embed the code in a html page the code shows only the first error message. It seems that calling the ForkJoinPool class crushes the applet on firefox. Do you know why? Here is the code.

 
Fabio D'Orta
Greenhorn
Posts: 5
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have also tried to put the applet on a public web page:

http://latastiera.altervista.org/


but still it doesn't work. Any suggestions?
 
Marshal
Posts: 25682
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should go into the Java control panel and change things so that the Java console always appears when you run an applet. Then when the error occurs, you'll be able to see its stack trace in the console.
 
Paul Clapham
Marshal
Posts: 25682
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And would I be right in assuming that you have dealt with the security issues on your system? The applet you posted there is unsigned, so it can't run without me doing some configuration to let that happen. But I'm not willing to let unsigned applets run on my system.
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thing to check is the version of the Java plugin for your browser. ForkJoinPool was added in Java 7 so your plugin must be at least version 1.7
 
Fabio D'Orta
Greenhorn
Posts: 5
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, thank you all for the answers.

As suggested by Paul Clapham, I enabled the Java console from the java control panel.
And the error was:
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThread")

So I went to my java.policy file located in java.home/lib/security/ and I wrote the following

grant codeBase "url or file where the applet is" {
permission java.lang.RuntimePermission "modifyThread";
};

And now the applet is working.

Again, thank you for your support.

Fabio
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad to hear you have fixed the problem and thanks for updating the thread with the solution.
    Bookmark Topic Watch Topic
  • New Topic