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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

Ranch Hand
Posts: 38
  • 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 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,

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).
Posts: 25682
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.)
Everybody's invited. Except this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic