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

Applet does not reflect the changes in (compiled) source code

 
Sergio Marcello
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
I have 2 questions.

1) Unless I terminate the JVM with the task manager, I can't see the changes in the applet code reflecting to the related applet inside an html page.

This does not happen if I test the applet via the commandline appletviewer, where I can see the code changes.

Is there any settings I'm missing ? Should I always terminate the JVM in order to see the changes I've made in code ? ( obviously I compile the applet code after the changes, and reload the html page. )

2) My applet connects to a local MySql database. It works only in this way: appletviewer -J-Djava.security.policy=grantacc.txt testapplet.html where grantacc.txt is a grant text file. The question. How to make it work without using appletviewer ? I mean, how can I provide the security policy file to an applet that runs inside an html page ?

Any help greatly appreciated,
Sergio.



 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
#1: The JVM must be terminated in order to see class changes. With appletviewer that happens automatically because it is restarted every time, but with a browser, you need to do that manually. Generally it happens if you close the browser.

#2: The Java Plugin control panel may have an option to let you pick a policy file. If it doesn't, then you may have to alter the system-wide file (which is somewhere in the JRE installation directory).
 
Paul Clapham
Sheriff
Posts: 21567
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
People don't usually use policy files for applets which are going to be widely distributed. And if your applet isn't going to be widely distributed, you should really consider writing an ordinary Java application and distributing it via Java Web Start.

(You should consider that even if it is going to be widely distributed, too. There are reasons for writing applets but not nearly as many reasons as you might think.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic