Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Fabio D'Orta
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?
 
Paul Clapham
Sheriff
Posts: 21572
33
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
Sheriff
Posts: 21572
33
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.
 
Tony Docherty
Bartender
Posts: 3054
59
  • 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: 3054
59
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic