Applet Stuck

... I am developing a client/server arch that connects to the database using jdbc.
... My application connects to the oracle database using jdbc....And the applet connects to the application using sockets........
When the applet is loaded to the intranet, i don't get the full applet loaded properly.I mean in my applet , i have an insert and a query button , howevever , my insert button is missing.I only have the query button there.When i click the query button, the applet gets stuck.
My application code is
import java.sql.*;
import java.util.Properties;
import java.io.*;
import java.net.*;
public class CommentsServer extends Thread {
public static final int DEFAULT_PORT = 7777;
protected int port;
protected ServerSocket server;
String username ="combtest";
String password = "combtest";
public static void main (String args[]) {
int port=0;
if (args.length == 1) {
try {
port = Integer.parseInt (args[0]);
} catch (NumberFormatException e) { }
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
String sourceURL ="jdbc:oracle:thin:@klmsph1:1521:KLM";
String user="combtest";
String password="combtest";
catch (Exception e) {
System.err.println("Failed to load JDBC driver.");
System.exit (1);
new CommentsServer (port);
public CommentsServer (int port) {
super ("Comments Server");
if (port == 0)
port = DEFAULT_PORT;
this.port = port;
try {
server = new ServerSocket (port);
} catch (IOException e) {
System.err.println ("Error creating server");
System.exit (1);
start();
public void run() {
System.out.println ("Server Running");
ThreadGroup connections = new ThreadGroup ("Comment Connections");
connections.setMaxPriority(this.getPriority()-1);
try {
while (true) {
Socket client = server.accept();
System.out.println ("Connection from: " + client.getInetAddress().getHostName());
CommentsConnection c = new CommentsConnection (connections, client);
} catch (IOException e) {
System.err.println ("Exception listening");
System.exit (1);
System.exit (0);
class CommentsConnection extends Thread {
static int counter = 0;
protected ObjectInputStream in;
protected PrintWriter out;
public CommentsConnection (ThreadGroup group, Socket client) {
super (group, "Connection " + counter++);
try {
in = new ObjectInputStream (client.getInputStream ());
out = new PrintWriter (client.getOutputStream(), true);
} catch (IOException e) {
try {
client.close();
} catch (IOException e2) { }
System.err.println ("Unable to connect.");
return;
start();
public void run () {
try {
String mode = (String)in.readObject();
if (mode.equals("insert")) {
String name=(String)in.readObject();
try {
String u="jdbc:oracle:thin:@klmsph1:1521:KLM";
Connection con=DriverManager.getConnection(u,"combtest","combtest");
PreparedStatement prep=con.prepareStatement("Insert into TEST values(?)");
prep.setString(1,name);
if(prep.executeUpdate()!=1)
throw new Exception("Bad update");
} catch (Exception e) {
out.println ("Error updating: " + e);
return;
} else if (mode.equals("query")) {
try {
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@klmsph1:1521:KLM","combtest","combtest");
Statement statement=con.createStatement();
ResultSet result=statement.executeQuery("SELECT * FROM TEST");
out.println("Name");
int nameCol=result.findColumn("NAME");
String name,user,comments;
while(result.next())
name=result.getString(nameCol);
out.println(name);
statement.close();
con.close();
} catch (Exception e) {
out.println ("Error querying: " + e);
return;
} else {
out.println ("Invalid Command: " + mode);
} catch (Exception e) {
out.println ("Error reading Stream: " + e);
out.close();
My applet code is:
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
import java.io.*;
import java.net.*;
/*<applet
code=j
width = 400
height = 400
>
</applet>
public class j extends Applet{
TextArea ta;
TextField name;
Panel p1,p2;
Button q,i;
Panel p3;
public void init(){
p1=new Panel(new BorderLayout());
q=new Button("Query");
p1.add(q,"South");
ta=new TextArea();
ta.setEditable(false);
p1.add(ta,"Center");
add(p1);
p2=new Panel(new BorderLayout());
i=new Button("Insert");
p2.add(i,"South");
p3=new Panel();
name=new TextField(" ",10);
p3.add(name);
p2.add(p3,"Center");
add(p2);
public void run_S(){
ByteArrayOutputStream bao=new ByteArrayOutputStream();
com cc=new com("sentri.com",0,bao,name.getText());
ta.setText(bao.toString());
public boolean action(Event e,Object o){
if(e.target==i){
run_S();
return true;
else if(e.target==q){
run_q();
return true;
else return false;
public void run_q(){
ByteArrayOutputStream bao=new ByteArrayOutputStream();
com cc=new com("sentri.com",0,bao);
ta.setText(bao.toString());
class com{
int PORT=7777;
private static final String query="query";
private static final String insert="insert";
private String host=null;
private OutputStream os=null;
public String n="null";
private int port=0;
com(String host,int port,OutputStream os,String name){
this.host=host;
this.port=((port==0)?PORT:port);
this.os=os;
insert(name);
run(name);
com(String host,int port,OutputStream os){
this.host=host;
this.port=((port==0)?PORT:port);
this.os=os;
query();
private void query () {
PrintWriter out = new PrintWriter (os, true);
try {
Socket s = new Socket (host, PORT);
ObjectOutputStream oos = new ObjectOutputStream (s.getOutputStream());
oos.writeObject (query);
oos.flush();
BufferedReader in = new BufferedReader (new InputStreamReader (s.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
out.println (line);
out.close();
s.close();
} catch (IOException e) {
out.println ("Error querying." + e);
return;
public void run(String name){
n=name;
private void insert (String name) {
PrintWriter out = new PrintWriter (os, true);
try {
Socket s = new Socket (host, PORT);
ObjectOutputStream oos = new ObjectOutputStream (s.getOutputStream());
oos.writeObject (insert);
oos.writeObject (name);
oos.flush();
BufferedReader in = new BufferedReader (new InputStreamReader (s.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
out.println (line);
oos.close();
s.close();
} catch (IOException e) {
out.println ("Error inserting." + e);
return;
void main(String args[]){
args[0]=n;
if(args.length==1)
com cc=new com("sentri.com",0,System.out,args[0]);
//return true;
else if(args.length==0)
com cc=new com("sentri.com",0,System.out);
//return false;
/my html file
the html file:
<html>
<body>
<hr>
<applet
code=j.class
width = 200
height = 200
>
</applet>
<hr>
</body>
</html>
Could anyone help me pls?

Well, if you want all the buttons to be shown... override
update(Graphics g) method of applet..in your class that extends Applet class.
Tufail

Similar Messages

  • Applet not loading from jsp

    using weblogic server 6.1 sp2, solaris 8 mu7, netscape 6.2.1
              the compiled applet UploadScreenshots.class is bundled into a web app
              file named roach.war and resides in the following directory in the war
              file:
              WEB-INF/classes/roach/web/applets/UploadScreenshots.class
              trying to deploy applet from jsp with following plugin definition in
              jsp:
              <jsp:plugin type="applet"
              code="roach.web.applets.UploadScreenshots.class"
              codebase="/classes/"
              height="200" width="500"
              jreversion="1.3"
              nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
              iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab">
              <jsp:fallback>
              <font color=#FF0000>Sorry, cannot run java applet!!</font>
              </jsp:fallback>
              </jsp:plugin>
              when executing the jsp from the browser, get the following error
              message when browser attempts to load the applet:
              Exception: java.lang.ClassNotFoundException:
              roach.web.applets.UploadScreenshots.class
              however, when codebase attribute is removed from plugin element
              definition and the compiled applet class (and its directory) is moved
              to the same directory as the jsp, the applet loads and works without
              any problems!
              what's up???
              

    joseph,
              thanks for the follow up. i still was not able to load the applet from
              the web-inf directory so i just jarred up the applet, stuck the jar
              file in the jsp directory, and added the archive attribute to the
              jsp:plugin element. everything loads and works fine. maybe i'll
              revisit loading applets from the web-inf directory later. thanks
              again.
              rick
              "Joseph Nguyen" <[email protected]> wrote in message news:<[email protected]>...
              > Rick,
              >
              > Take a look here real quick:
              > http://e-docs.bea.com/wls/docs70/jsp/trouble.html#error-plugin. It's not
              > much, but if it doesn't help please open a case with BEA Support via
              > WebSupport portal here http://support.bea.com/welcome.jsp as there is no
              > existing issue in our bug db right now with the jsp:plugin tag.
              >
              > Regards,
              > Joseph Nguyen
              > BEA Support
              >
              > "rick bryant" <[email protected]> wrote in message
              > news:[email protected]...
              > > using weblogic server 6.1 sp2, solaris 8 mu7, netscape 6.2.1
              > >
              > > the compiled applet UploadScreenshots.class is bundled into a web app
              > > file named roach.war and resides in the following directory in the war
              > > file:
              > > WEB-INF/classes/roach/web/applets/UploadScreenshots.class
              > >
              > > trying to deploy applet from jsp with following plugin definition in
              > > jsp:
              > > <jsp:plugin type="applet"
              > > code="roach.web.applets.UploadScreenshots.class"
              > > codebase="/classes/"
              > > height="200" width="500"
              > > jreversion="1.3"
              > >
              > nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
              > >
              > iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab"
              > >
              > > <jsp:fallback>
              > > <font color=#FF0000>Sorry, cannot run java applet!!</font>
              > > </jsp:fallback>
              > > </jsp:plugin>
              > >
              > > when executing the jsp from the browser, get the following error
              > > message when browser attempts to load the applet:
              > > Exception: java.lang.ClassNotFoundException:
              > > roach.web.applets.UploadScreenshots.class
              > >
              > > however, when codebase attribute is removed from plugin element
              > > definition and the compiled applet class (and its directory) is moved
              > > to the same directory as the jsp, the applet loads and works without
              > > any problems!
              > >
              > > what's up???
              

  • Cannot delete the applet

    i'm working on JCOP in Eclipse and have a big problem now. normally i can install, select, and send command and finally delete applets. but the recent applet(performing class Cipher testing) i've installed, selected and run, but it can't be delete. attempting to delete always return error code 6985 and the applet stucks forever!! so i wanna know how can i delete such the applet? and can we replace the applet with a new one that has the same AID?
    the trouble code is:
    public static byte constructor01(){
              try{
                   cip = new CipherTestClass();
              }catch(Exception e){
                   return (byte)1;  // FAIL
              return (byte)0;  // PASS
         }the above code always return status word 6985 and the applet cannot be remove
    but if i change to this one, the applet can be delete with "delete" command with status word 9000:
    public static byte constructor01(){
              try{
                   CipherTestClass cip = new CipherTestClass();
              }catch(Exception e){
                   return (byte)1;  // FAIL
              return (byte)0;  // PASS
         }Both of the code have no error, can be installed, selected, and run, but only the second that can be remove from card.
    thank you

    Your first sample seems to store a reference to an object in a static field. You cannot delete an applet if a such a reference exists. (See Java Card specification!)
    If you are using a GP211 card, you can delete the entire package using the following JCShell command:
    delete -r <pkgaid>

  • Load: class oracle.forms.engine.Main not found Stuck at loading Java Applet

    Hi there
    I have recently installed App Server 10.1.2.0 on a new machine.
    Copied all my forms to an appropriate directory. Set up formsweb.cfg to allow them to run and have attempted to run them.
    Unfortunately I get stuck at the Loading Java Applet screen, and in the status bar at the bottom it says :
    load: class oracle.forms.engine.Main not found
    I have taken a look at the Java Console, and the 2 things that jump out at me are that it appears to be looking for a forms90 directory, which seems odd since I am using App Server 10.1.2.0.2 and Forms Builder 10.1.2.0.2 meaning it should be looking in a forms directory not forms90 directory shouldnt it ?
    And also, it mentions class with no proxy, so on looking around the forums it has been suggested that put the proxy details into jinitiator, which I have done, but this has made no difference either.
    Can anyone suggest anything else please ?
    Java Console log follows.
    Thanks a lot
    Scott
    Oracle JInitiator: Version 1.3.1.9
    Using JRE version 1.3.1.9 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\hilliers
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Unregistered modality listener
    Removed trace listener: sun.plugin.ocx.ActiveXAppletViewer[oracle.forms.engine.Main,0,0,914x613,layout=java.awt.BorderLayout]
    Sending events to applet. STOP
    Sending events to applet. DESTROY
    Sending events to applet. DISPOSE
    Sending events to applet. QUIT
    Finding information...
    Releasing classloader: sun.plugin.ClassLoaderInfo@d9850, refcount=0
    Caching classloader: sun.plugin.ClassLoaderInfo@d9850
    Current classloader cache size: 1
    Done...
    Registered modality listener
    Referencing classloader: sun.plugin.ClassLoaderInfo@d9850, refcount=1
    Added trace listener: sun.plugin.ocx.ActiveXAppletViewer[oracle.forms.engine.Main,0,0,914x613,invalid,layout=java.awt.BorderLayout]
    Sending events to applet. LOAD
    Sending events to applet. INIT
    Sending events to applet. START
    Determine if the applet requests to install any HTML page
    HTML Installation finished.
    Opening http://appserver008/forms90/java/oracle/forms/engine/Main.class
    Connecting http://appserver008/forms90/java/oracle/forms/engine/Main.class with no proxy
    Opening http://appserver008/forms90/java/oracle/forms/engine/Main.class
    Connecting http://appserver008/forms90/java/oracle/forms/engine/Main.class with no proxy
    load: class oracle.forms.engine.Main not found.
    java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    You're a star, thanks.
    In my haste I had cut too much out of my old formsweb.cfg file and not realised I'd done it.
    Thanks Francois.

  • Checkpoint SSL Network extender stuck on Java applet when using firefox 4.0.1

    I use check point SSL network extender on my mac to access my company's VPN. Since upgrading to 4.0.1, I get the message "Please confirm the use of this Java applet and then refresh or reopen the window.
    If you have already disapproved using this applet, you might need to restart your browser before attempting to connect again"
    I'll accept, refresh, wait, and then the message comes back. I never get through. I just uninstalled 4.0.1 and went back to 3.6.17 and it's working fine on the old version.

    The first thing I notice is that you are using Firefox 4 and that is now out of date, it is not considered secure so it would make sense to upgrade to Firefox 5 (Or Firefox 6 if you read this after the 16th)
    You mention Firefox 3.6.17, and although Firefox 3.6 is still (for possibly only a limited time) supported I believe the current version is 3.6.20 (it is certainly at least 3.6.18) so again you are using an out of date version. I am not a Mac user but IIRC some of the recent updates were Mac specific and fixed Mac problems, possibly problems relating to Java.
    If you wish to use more than one version of Firefox to test problems developers tend to use separate profiles and custom installs but for ordinary users it may be worth considering firefox [http://portableapps.com/apps/internet/firefox_portable portable] versions. (that tip is applicable mainly to Windows users, no doubt there is also a poratable version for firfox5 Mac users somewhere)

  • Java Plug-in 1.3.1_08 problem. IE stucks, running Applet, on setVisible met

    Hello,
    I have a problem, that appears in Plug-in 1.3.1_08 (1.4 is ok). The Microsoft Internet Explorer sucks, running my Applet.
    It occurs, when AWT Frame uses method show().
    In a correct situation (for example Java Plug-in 1.4), the applet appears in a separate window (not into IE). When the problem occurs, the Applet's window does not appear and the Internet Explorer (and Java console) are stuk in.
    When I change the mehod to setVisible(true), the problem still exists.
    In the both cases the Applet appears and works correctly for Java 1.4 and more.
    Please help.

    Have you check bugs.sun.com to see if this is a known issue? If it isn't there,
    file a new bug.

  • Stuck on "Initializing Media Player Applet, Please Wait." under Recordings - Calabrio One Quality Management

    We're having an issue with a couple of users who cannot access the Recordings section of the Calabrio Quality Management web interface. Other users can login and view Recordings just fine and they seemingly are configured the same. Here is what the failed user experiences:
    1) User logs in to Calabrio Quality Management (Separate Logins) via the Cisco Unified Workforce Optimization page.
    2) User clicks Recordings button on the top part of the page
    3) After accepting a couple of Java Security prompts and enabling pop-ups, it just hangs on the following prompt:
    Initializing Media Player Applet, Please Wait...(This may take several minutes)
    What's odd is that on the same PC, I will log in with another user that is known to work, and they can access the page with no problems.
    Here are things I have tried to rectify the problem but have not succeeded:
    - Tried on IE 8, 10 and 11, Firefox, and Chrome
    - Cleared Java Temporary Internet Files
    - Checked users permissions Under Quality Manager Administrator
    - Validated PC settings (where the login is), all checks have passed
    We are running Calabrio One Quality Management 9.0.1.57. 
    Any ideas?
    Thanks,
    John

    Hey all,
    I spoke to Calabrio Support and this is a known issue with all versions of QM to date. The problem is when sometimes user searches are too big. The QM C1 auto-executes the most recent search and will cause the page to never load.The fix as follows:
    1) Log into the Windows Server that has the QM Software installed.
    2) Open "Quality Management Administrator" and log in. Expand 'Site Configuration', then click 'System Database' to find the SQL Instance Hostname/IP. You'll need it for Step 4.
    3) On Windows, Click 'Start >> All Programs >> Microsoft SQL Server 2008 R2 >> SQL Server Management Studio'
    4) SQL Server Authentication. Input the following:
    Server Type: Database Engine
    Server Name: <SQLInstance>\QM
    Authentication: SQL Server Authentication
    User: sa
    Password: *********
    Log in.
    5) Expand 'Databases'
    6) Right-click the database 'SQMDB', then click 'New Query'
    7) Enter this command:
    delete from Search where name='recentsearchforsystem'
    8) Click Execute
    9) Log into the Web interface again and test and verify access to Recordings is now working

  • Problems with pacman applet, and advice on a gaming portfolio

    Hi
    I recently made a pacman applet, im having a few problems with it though, the first time the applet is run on a browser, the ghosts(represented by squares) often dont appear or if they do, they are stuck in walls, this never happens when i run offline on my computer. Is this because the very first time the applet is run, it doesnt load properly, but the second time some of the files are in the cache so it loads fully?
    Also everytime i refresh the browser the applet dissapears and is replaced with a blank space and a cross in the top left hand corner, does anyone know the reason for this?
    The applet can be found below, if you do decide to play it, please bear in mind what i have said, so it might not load correctly the first time, if this is the case please refresh, or close the broswer and reopen the link! Also you will need to click the applet for it to gain focus before you can move pacman - use the arrow keys the control pacman.
    http://www.renaissance-designs.co.uk/Satwant/java/pacman/
    Id also be very gratful for some advice - id like a change in career, ive always wanted to get into gaming, ive had some previous knowledge in java i made a programme that could generate its own poetry in java for my dissatation, but i still never had a huge amount of confidence, and so went into websites.
    BUT now i have decided to take the leap back into programming and give it a go, which is why ive made this game.
    I thought id make a portfolio and try and apply for a few gaming jobs. This applet took me two weeks to make and it was in my spare time, i am fully aware its not perfect, and it doesnt look great, but i would like to know what people think of it, also how many more games do you think i should make, before i apply for gaming jobs? Does anyone have any advice on what would make a good portfolio for a java gaming job?
    Thanks alot, i look forward to what you think of the game, and your advice!
    SSKenth

    sskenth wrote:
    Thanks for getting back to me with that information, i didnt know you could see that information with just a simple right click!
    But im afraid that doesnt really help me solve the problem, im not sure what all of that information means! :SI have very little experience with applets, but I can tell you what I would do to debug this (forgive me if you already know this stuff).
    Look at the stack trace you get in the Java Console that I posted earlier. Each line contains a method that was called from the method on the previous line. So, java.lang.Thread.run() called sun.applet.AppletPanel.run(), which called Room.init(), etc. Look at the topmost line whose method is something you wrote, not something in the standard Java libraries. In your case it looks like PaintSurface.java (specifically, line 22). Look at what line 22 of PaintSurface.java is doing, it's calling Thread.start(). If you check out the Javadoc for Thread.start(), it says IllegalThreadStateException gets thrown if you call start() on a thread that has already started. So that's your problem. Without looking at your code, I'd assume you want to stop your thread in your applet's destroy() override, and instead of reusing it, create a new one each time init() is called.
    Ill try and look into, thanks again though, it gives me somthing to work with :D
    Btw when you first ran the applet, did all the ghosts(3) load up correctly?Unfortunately, no. The first time I ran it, there was only 1 ghost (or maybe all 3 overlapping each other?) at the top of the screen, and they never moved. Refreshing once made the game play as I think you want it to. Refreshing a third time gave the dreaded red X.
    ...oh and just out of curiosity,,, did u have fun playing the game :DSure did.

  • Getting applets to work in Firefox or IE7!!

    Hi folks.
    I've been reading Jason Hunters excellet book on Java Servlet Programming and become rather stuck on being able to get applets to work in a browser.
    1) I managed to briefly get an Applet to work in IE7. Then things went astray (I say work, because applet initially displayed correctly graphically)
    2) I introduced a bug and tried to redisplay. And haven't been able to recover.
    3) When 2) occurred I swapped over to Firefox, since IE7 doesn't have a Java Console. (& theres no setting to enable it in security settings either)
    4) Then Firefox prompted to download JRE... This was an odd one to me.... Since I already had a Java runtime...
    I got this through downloading file java_app_platform_sdk-5_04-windows.exe
    java -version yeilds:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Jeremy>java -version
    java version "1.6.0_04"
    Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
    C:\Documents and Settings\Jeremy>
    Browser Versions
    IE : is at version 7.0.5730.13
    Firefox started out at 2.0.0.12... Now Firefox didn't seem to detect the JRE
    5) It said additional plugins are required to display the media on this page...
    6) I clicked the button to "Install missing plugins"
    It then presents Plugin Finder Service with "Available Plugin Downloads" of Java Runtime Environment with checkbox ticked.
    7) I clicked "next", at which point it completes saying
    No plugins were installed
    Java Runtime Environment failed with "Manual Install" button...
    Clicking said button gave me executeable xpiinstall.exe from http://sdlc-esd.sun.com
    8) When I ran this it
    a) proceeded to cause Firefox to crash and a report was sent to Mozilla...
    b) created a restore point called "Installed Java (TM) 6 update 5..
    9)So now I went back to IE 7 having given up on Firefox...
    Now it complained about missing classes which I felt sure were in a jar I'd deployed in Tomcat...
    10) I tried to validate my assumptions by looking inside the Jar with Winzip...
    Then I got a pop up with "Java Virtual Machine Launcher" in its title saying..
    "Failed to load Main-Class manifest attribute from cos.jar"
    At this point I realised 8) was the culprit after posting here and looking at possible causes for said pop-up.
    [http://www.artima.com/forums/flat.jsp?forum=1&thread=61427&start=75&msRange=15]
    None of solutions posted there seemed to apply to me
    11) So now I restored to a restore point prior to 8) and though my problems were over
    12) I've since upgraded to Firefox 2.0.0.14. Firefox pushed update to me. Also tried manually uninstalling and downloading file. Still saying missing plugin!!!
    13) I've tried changing my tags in my html from
    APPLET to OBJECT for IE7 or EMBED for Firefox..
    I've validated my APPLET with APPLETVIEWER following advice posted here:
    [http://java.sun.com/docs/books/tutorial/deployment/applet/index.html]
    No tell tale signs appear in Tomcat Console or logs..
    *The only thing that seems weird is codebase tag*
    14) Book I've been reading mentioned putting both html code and applet class in root folder of tomcat
    I've hosted both files here:
    C:\Apps\apache-tomcat-6.0.16\webapps\ROOT
    15) When I test with appletviewer from this folder and codebase set to / appletviewer doesn't find class.
    I think I need to set this so when web browser runs it finds class. Maybe this is the route of my problems.
    What's haunting me here though is placeholder for applet graphic worked at one point!
    I don't recall fussing with codebase attribute of applet tag, yet suddenly things stopped working.
    16) When I tried to verify with appletviewer I had to remove codebase attribute completely to get things to work.
    Here are three versions of html file. Firefox version doesn't seem to be recognized by Appletviewer
    Applet tag version: (BTW have tried with CODEBASE=/ too. This was how it appeared in book, Remember I'm hosting in Tomcat 6.0.16)
    {code}
    <HTML>
    <HEAD><TITLE>Daytime Applet</TITLE></HEAD>
    <BODY>
    <CENTER><H1>Daytime Applet</H1></CENTER>
    <CENTER><APPLET CODE="DaytimeApplet.class" WIDTH=300 HEIGHT=180></APPLET></CENTER>
    </BODY></HTML>
    {code}
    IE Version only
    {code}
    <HTML>
    <HEAD><TITLE>Daytime Applet</TITLE></HEAD>
    <BODY>
    <CENTER><H1>Daytime Applet</H1></CENTER>
    <CENTER><object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="300" height="180">
    <param name="code" value="DaytimeApplet.class"></object></CENTER>
    </BODY></HTML>
    {code}
    Firefox version with JRE matching what java -version says precisely and using "jpi-version" so need for download instructions url 'should' be redundant..
    {code}
    <HTML>
    <HEAD><TITLE>Daytime Applet</TITLE></HEAD>
    <BODY>
    <CENTER><H1>Daytime Applet</H1></CENTER>
    <CENTER>
    <embed code="DaytimeApplet.class"
    width="300" height="180"
    type="application/x-java-applet;jpi-version=1.6.0_04"/>
    </CENTER>
    </BODY></HTML>
    {code}
    I don't want to be staring at a placeholder in a Web Browser.
    I want to GUI as it appears in AppletViewer and how it once had it working in IE7!
    You wouldn' t think that was to much to ask for would you! Sorry for length of this post.
    Any clues as to where to go next would be greatly appreciated as I'm pulling hairs out with frustration at the moment...
    A few of footnotes:
    1) I've relaxed my security zone settings for intranet, added localhost to local intranet sites..
    2) I've tried deleting all temporay files in IE7 even to point of resetting to install setup thinking there may be some sort of caching issue with bad applet... No luck
    3) I can still get Glassfish server to login to Admin Console.
    So the integrity of my pc should me intact based on the shenanigans of point 11. Restoring to get rid of second JRE

    paulcw wrote:
    I'm not sure what to tell you. I've never had any trouble installing the JRE and getting applets to work. Maybe it's an IE7 thing. Firefox is usually easier to configure.
    Anyway, it sounds like something that you need to be sitting at your computer to fix, so I don't know how useful a forum will be. It might be best just to ask a coworker with a lot of arcane knowledge to take a look at it.1) Unfortunately I'm learning from home and don't have the luxury of asking a co-worker. Have fired off email to one of folks at Sun..
    In my efforts to try and track down the problem yesterday, Google uncovered some interesting findings regarding Caching of Applets. Thought I'd share this:
    2) [http://www.velocityreviews.com/forums/t603400-ltobjectgt-tag-and-applet-caching.html]
    There is an interesting post some way down posted by james.a.cleland
    Quote:
    "My solution is to x-c in the Java console to clear
    this cache. This works without unloading the JVM and while the applet
    is running. It looks like the browser isn't caching any applets. At
    least my browser cache doesn't contain any, although I do regularly
    use half a dozen, so it must be the JRE. Anyway, clearing through the
    console solves my problem".
    I can't access Java Console in IE7 as you know...
    3) There is always another way to skin a cat regarding clearing cache.
    Found this here:
    [http://www.aurigma.com/Support/DocViewer/28/UpdatingImageUploaderonClientSide.htm.aspx]
    Search for Java section
    Quote:
    "Java applets are stored in the cache that is accessible through the Java control panel. Follow these steps to do it:
    Open Java Plug-in Control Panel. Depending on the platform, it can be found in different locations:
    Windows: Control Panel -> Java Plug-in
    Click the Cache tab.
    Click Clear to clear all cached applets."
    *Problem is that there is no Java Plug-In within Control panel. Mentioned this with Coffee Cup reference above..*
    4) Also saw this article on *"How to troubleshoot Java applet and component download problems"* at:
    [http://support.microsoft.com/kb/241111]
    Java console or output log section:
    Javalog.txt in the windows\java or winnt\java directory
    windows\java contains
    - classes
    - trustdb
    No such file: classes & trustdb are empty folders.
    5) I have same problem mentioned here:
    [http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=915520&SiteID=1]
    Quote:
    "I cannot get java applets to display on any web pages - instead this message appears:
    alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag! "
    Yep. That's my predicament.
    BTW: Get this by doing test here:
    [http://java.sun.com/products/plugin/1.5.0/demos/applets/Clock/example1.html]
    6) Sun's Verify Installation fails on me too:
    [http://www.java.com/en/download/installed.jsp]
    7) I'm interested in knowing how IE7 caches the applets too. Does it store some sort of class-id in the registry? (I'm on XP SP2)
    8) Is there an installation integrity verifier for Sun? Something that verifies the integrity against a baseline install and reports anomalies.Like I mentioned earlier I've got java_app_platform_sdk-5_04-windows.exe file installed. Not the latest incarnation, but the one immediately before. With SE 1.6.0_04-b12 built built into it

  • Applet not opening in browser  Help needed

    Hi experts,
    I have Java installed in my machine in the path C:\Program Files\Java
    While trying to open the link http://www.radinks.com/upload/applet.php in browser, I am being asked to install the missing plugin and that plugin is java.
    I do not know why this happens and I am stuck with this problem for sometime.
    Any help in this regard will be well appreciated with dukes.
    Thanks in advance,
    Kind Regards,
    Anees

    faheemhameed wrote:
    I have the same issue. But this is on Internet Explorer 8. Firefox is fine.Given the [web page does not validate|http://validator.w3.org/check?uri=http%3A%2F%2Fwww.radinks.com%2Fupload%2Fapplet.php&charset=(detect+automatically)&doctype=Inline&group=0] *(<- link),* I am not surprised it fails in some browsers while working in others. Checking the source of the page itself, I notice the applet is embedded in the page using an OBJECT element only, and that possibly also explains why it works in some browsers but not others.
    The best bet of the author of the web page is to defer writing the applet element to the [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit] *(<- link)* that is provided by Sun.
    Unfortunately there is little that you can do about it, unless you want to attempt creating a page to load off your hard disk, that is valid and workable for IE. I cannot guarantee it will work, but try this variant..
    The altered web page, which can be tested at [http://pscode.org/test/radinks/applet.html].
    <html>
    <body>
    <applet
      code="com.radinks.dnd.DNDAppletPlus"
      archive="dndplus.jar"
      codebase="http://www.radinks.com/upload/"
      width= "290"
      height= "290"
      alt="Java is recognised, but disabled!">
        <param name="url" value = "http://67.131.250.110/upload.php">
        <param name="message" value="http://www.radinks.com/upload/init.html">
        <param name="name" value="Rad Upload Plus">
        <param name="max_upload" value="10000">
        <param name="encode_path" value="yes">
        <param name="translate_path" value="yes">
        <param name="full_path" value="yes">
    This browser does not recognise the Java APPLET element.  Get Java from www.java.com.
    </applet>
    </body>
    </html>

  • How can I Fill up the applet form from VB code?

    Hi,
    I urgently required help in this issue.
    Please check the below URL :
    http://java.sun.com/applets/jdk/1.4/demo/applets/ArcTest/example1.html
    this is the sample i found on the java example page.
    What I want to do is?
    I want to opened that page in IE from VB. I did it by below code.
    Public WithEvents IE As SHDocVw.InternetExplorer
    Public WithEvents HtmDoc As HTMLDocument
    Private Sub CreateIE()
    Set IE = CreateObject("InternetExplorer.Application")
    IE.Visible = 1
    End Sub
    Private Sub IE_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    Set HtmDoc = IE.document
    End Sub
    Private Sub Navigate(URL)
    IE.Navigate URL
    End Sub
    Private Sub Command1_Click()
    CreateIE
    Navigate "http://java.sun.com/applets/jdk/1.4/demo/applets/ArcTest/example1.html"
    Call SetDocument
    End Sub
    Private Sub SetDocument()
    Set HtmDoc = IE.document
    For i = 0 To HtmDoc.getElementsByTagName("a").length
    List1.AddItem HtmDoc.All(i)
    Next i
    End Sub
    I just want to set the value of that two text box and then I want to click on that button.
    Is there any way that i can do it by getting the java applet content or by some another way?
    I downloaded the Java Activex Bridge. but i didn't found any solutions. I couden't understand that how can I use it.
    Please reply me as soon as possible as I am stuck on it. If possible send me sample project in VB 6.0 also for the same.
    Edited by: Sanket Shah on Feb 25, 2010 2:41 AM
    Edited by: SanketShah on Feb 25, 2010 2:43 AM
    Edited by: SanketShah on Feb 25, 2010 2:44 AM

    I'm certain that VB forums exist. I'm fairly certain that Microsoft would support them, so that's where I would look.
    But I would bet a fair amount of money that they'll tell you "That's a Java problem, ask on a Java forum". Let me just say that you can interface with an applet via Javascript (I haven't done it myself but you could look it up). Then your problem becomes how to execute Javascript from your VB code. That's probably askable on the VB forum.

  • Dynamically Loading .jar into the AppletClassLoader of Signed Applet

    First of all, I thank you for reading this post. I will do everything I can to be concise, as I know you have things to do. If you're really busy, I summarize my question at the bottom of this post.
    My goal:
    1.) User opens applet page. As quickly as possible, he sees the "accept certificate" dialog.
    2.) Applet gets OS vendor, and downloads native libraries (.dll for windows, etc.) and saves them in user.home/ my new dir: .taifDDR
    3.) Calls are made to System.load(the downloaded .dlls) to get the natives available.
    4.) Applet downloads the .jar files that we stripped so that the applet was smaller, one by one
    5.) For each .jar downloaded, it goes through the entries, decodes the .class files, and shoves them onto the AppletClassLoader.
    6.) Finally, the looping drawmation of the applet is linked to a subclass, that now has everything it needs to do what it wants.
    I have gotten all the way to step 5!!! It was amazing!
    But now I'm stuck on step 5. I can download the .jar files, read them, even decode the classes!
    As evidence, I had it print out random Methods using reflection on the created classes:
    public net.java.games.input.Component$Identifier net.java.games.input.AbstractComponent.getIdentifier()
    public final void net.java.games.input.AbstractController.setEventQueueSize(int)
    public java.lang.String net.java.games.input.Component$Identifier.toString()
    public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException
    ... many many more So, its frustrating! I have the Class objects! But, whenever the applet begins to try to, say instantiate a new ControllerEnvironment (jinput library), it says ClassNotFoundException, because even though I made those Classes, they aren't linked to the system classLoader!
    Here is how I am loading the classes from the jar and attempting to shove them on the appletclassloader:
    ClassLoader load = null;
    try {
         load = new AllPermissionsClassLoader(new URL[]{new File(url).toURL()});
    } catch (MalformedURLException e2) {
         e2.printStackTrace();
    final JarFile ajar = new JarFile(url);
    ... we iterate over the elements (trust me, this part works)
    String name = entry.getName();
    if (name.endsWith(".class")) {
         name = name.substring(0, name.length() - 6);
         name = name.replace('/', '.');
              Class g = load.loadClass(name);
    public class AllPermissionsClassLoader extends URLClassLoader {
        public AllPermissionsClassLoader (URL[] urls) {
            super(urls);
        public AllPermissionsClassLoader (URL[] urls, ClassLoader parent) {
            super(urls, parent);
            System.out.println(parent);
        public AllPermissionsClassLoader (URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory) {
            super(urls, parent, factory);
        protected PermissionCollection getPermissions (CodeSource codesource) {
            Permissions permissions = new Permissions();
            permissions.add(new AllPermission());
            return permissions;
    }so, my assumption here is that if I create a new AllPermissionsClassLoader and then call loadClass, the loaded class (because it does return a valid Class object) is usable globally across my applet. If this is not true, how should I else be doing this? Thank you for Any advice you could offer!

    I know it's two years ago but the OP's approach seems pointless to me.
    4.) Applet downloads the .jar files that we stripped so that the applet was smaller, one by oneWhy? Just name the JAR files in the CLASSPATH attribute of the <applet> tag. Then what you describe in (5) and (6) happens automatically on demand.
    protected PermissionCollection getPermissions (CodeSource codesource) {Who does he think is going to call that?

  • Could not load applet in a browser using jre 1.6.0_06

    Hi,
    I am facing problem with loading applets when the browser uses jre 1.6.0_06.
    Not able to understand what actually the problem is, I tried to check with a small applet that would simply print Hello World on the java console. Even this applet also could not be loaded on the browser. I could load this applet in the test environment of eclipse, but not able to load it on the browser when the applet is deployed on Tomcat.
    We have no problems in loading applet if the browser is using an earlier version of the jre.
    One more thing we have found out that, if we change the SSL cipher suite of the ssl.conf file such that it can support weaker protocols, my applet works with jre 1.6.0_06 also.
    But one thing we could not understand is that why changes in SSL cipher suite of the ssl.conf file creates problem in loading the applet, only in case the browser is using jre 1.6.0_06. I mean to say that changes in the SSL cipher suite does not create any problem in loading the applet if my browser is using an earlier version of jre 1.6.0_06.
    Please help me out as I don't have any clue regarding this problem.
    Thanks in advance.

    Hi,
    We have found a wor around for this problem.
    The following option has been unchecked and the applet could be loaded.
    Go to java control panel
    Under the Advanced Tab
    Under the Security section
    Uncheck the last option "Use TLSv1.0".
    This makes the applet work.
    But could not understand as why this is creating a problem.
    We have tried to include TLSv1.0 in the cipher suite of our apache server, while keeping the above option in java plugin control panel checked, but even that did not solve the problem.
    Please help me of how should I proceed for this problem, as I am totally stuck.
    Thank you.

  • Applet not opening a socket on its own host. Please help.

    I have also posted this in JSC2 forum.
    My applet is not able to open a socket on its own host.
    The applet is being served by a JSP (developed using Sun Creator2) from my laptop behind a DHCP broadband router at (say) 125.238.104.132 at my residence. I have a URL �samsub.no-ip.biz� that redirects port 80 calls to 29080 where my application runs. All required router rules/mapping are done and the JSPs run perfectly fine. In one of the pages, I have inserted an applet inside an escape disabled statictext field as follows:
    <applet code="AppClient.class" width=540 height=440></applet>
    The applet code and the test server code are shown below for your analysis. Note that, when run on the same machine (at home), the applet works fine. The commented lines will show other failed test. The error reported at the java console was: null pointer at line 56
    Could someone help me please. Thanx. MarySam
    The applet code
    1     import java.util.*;          
    2     import java.awt.*;          
    3     import java.applet.*;          
    4     import java.text.*;          
    5     import javax.swing.*;          
    6     import com.sun.java.swing.plaf.windows.*;          
    7     import java.awt.event.*;          
    8     import java.net.*;          
    9               
    10     public class AppClient extends Applet {          
    11     JInternalFrame jif;          
    12     JTextArea jta1, jta2;          
    13     Socket kkSocket = null;          
    14               
    15     public void init() {          
    16          try {     
    17               LookAndFeel lf = new WindowsLookAndFeel();
    18               UIManager.setLookAndFeel(lf);
    19          kkSocket = new Socket("125.238.104.132", 4444);
              //kkSocket = new Socket("samsub.no-ip.biz", 4444);
              //kkSocket = new Socket("125.238.104.132:29080", 4444);
              //kkSocket = new Socket("samsub.no-ip.biz:29080", 4444);
    20          }      catch(Exception e) {}
    21               
    22          setLayout(null);      
    23          setBackground(Color.black);     
    24          jif = new JInternalFrame();     
    25          jif.setLocation(20,20);     
    26          jif.setSize(500,400);     
    27          Container con1 = jif.getContentPane();     
    28          con1.setLayout(null);     
    29               
    30          jta1 = new JTextArea();      
    31          JScrollPane jcp1 = new JScrollPane(jta1);     
    32          jcp1.setBounds(10,10,410,100);     
    33          con1.add(jcp1);     
    34               
    35          jta2 = new JTextArea();     
    36          JScrollPane jcp2 = new JScrollPane(jta2);     
    37          jcp2.setBounds(10,115,470,245);     
    38          con1.add(jcp2);      
    39               
    40          JButton jb = new JButton("Go");     
    41          jb.setBounds(425,10,60,30);     
    42          jb.addActionListener(this);     
    43          con1.add(jb);      
    44               
    45          JLabel jlb = new JLabel();     
    46          jlb.setOpaque(true);     
    47          jlb.setBackground(Color.gray);     
    48          jlb.setForeground(Color.white);      
    49          jlb.setBounds(425,50,60,30);     
    50          con1.add(jlb);      
    51               
    52               
    53          jif.setVisible(true);     
    54          add(jif);      
    55          //jta2.setText(getCodeBase().toString());     
    56          jta2.setText(kkSocket.getInetAddress().toString());     
    57               
    58     }          
    59               
    60     public void start() {}          
    61               
    62     public void stop() {}          
    63               
    64               
    65     }          
    66               
    67               
    The test server Code
    1     import java.net.*;                         
    2     import java.io.*;                         
    3                              
    4     public class MyServer {                         
    5     public static void main(String[] args) throws IOException {               
    6                              
    7     ServerSocket serverSocket = null;                    
    8     try {                         
    9     serverSocket = new ServerSocket(4444);                    
    10     } catch (IOException e) {                         
    11     System.err.println("Could not listen on port: 4444.");          
    12     System.exit(1);                         
    13     }                         
    14                              
    15     Socket clientSocket = null;                         
    16     try {                         
    17     clientSocket = serverSocket.accept();                    
    18     System.out.println(clientSocket.getInetAddress().toString());          
    19     } catch (IOException e) {                         
    20     System.err.println("Accept failed.");                    
    21     System.exit(1);                         
    22     }                         
    23                              
    24     clientSocket.close();                         
    25     serverSocket.close();                         
    26     }                         
    27     }                         
    28                              
    29

    Hi Guys,
    I'm not actually from Mozilla Firefox, but I've had this problem before, and I've solved it with the help from another website.
    What you need to do is download a programme called "tdsskiller" from here:
    http://www.geekpolice.net/t23369-computer-infected
    scroll down the page and you should see a link. (I know the article itself seems irrelevant to your problem, but trust me, the programme they recommend works on this virus too.) It's only 1.3MB or so, so it doesn't take up huge amounts of space either! :)
    I can safely say that it is COMPLETELY safe to download this from geekpolice.net, as this website is a free website which helps people with viruses on their computer. If you ever have another problem with anything to do with computers, go and have a look on geekpolice.net, they should have something that might help you.
    Before anyone wonders why I am singing its praises so much, no I am not advertising them for any personal gain, but they have helped me get rid of some pretty nasty viruses on my computer before, so I am very grateful to them :)
    SO, anyway, after you've downloaded the tdsskiller, you should run it, and it may find some infected files, in which case let it repair them. After rebooting your computer, the annoying opening tab thing should be gone!
    I hope this works for anyone who's stuck :) If it doesn't, I'm really sorry, but it has definately worked for me!
    Good luck!
    Yashmeee :)

  • Apple script is stuck working with Numbers

    Hello, everyone
    I need some help.
    I wrote a script what was supposed to do perform following:
    I receive a Numbers-format file imported to my Mac from iPad with iTunes
    This file is a sort of daily journal. Every row includes info about one particular client. A name of the client is in column 2. The file name is always "Blank.numbers" and the table name is always "Blank". I need to copy this table in a new file and collect the data for each client in a different table . In other word i need to make new tables in a new file and copy client info in its own table.
    The script is below. It seems to work right (it makes a new file, makes some tables, puts correct info into them) but one thing happens  - it's stuck in a little while after run. Sure, I reloaded my Mac and not ones but nothing at all - zero effect, the same thing happened over again, after the script successfully worked it  was stuck and i just could see "running". My test data file consists of just up to 40 rows, but I've never had this work completely done. 
    Not much scriptwriter of myself - it's just my very first experience in the subject and I have no clue about why it could be, so I'll appreciate for any suggestion
    on run
         set FileName to "Blank.numbers"
         set ClientColumn to 2
         set CashFlowSheetName to "Cash Flow"
         tell application "Numbers"
              activate
              set FileName to "Blank.numbers"
              set ClientColumn to 2
              set WorkDocument to my makeAnNumbersDoc("Blank.nmbtemplate")  -- creating a new file
              tell document WorkDocument to tell sheet 1
                   set name to CashFlowSheetName
                   delete table 1
              end tell
              set Clients to my GetListOfClients(FileName, ClientColumn) -- getting full list of the clients
              repeat with i from 1 to count of Clients
                   set FullCopy to my GetTable("Blank.numbers", item i of Clients, ClientColumn)  -- choosing data
                   my MakeTable(WorkDocument, CashFlowSheetName, FullCopy, item i of Clients) -- making table with name of  a client for every client
              end repeat
         end tell -- numbers
         return my GetListOfClients(FileName, ClientColumn) -- test line, del me!
    end run
    on MakeTable(WorkDocument, WorkSheet, DataList, Client)
         local i, j
         tell application "Numbers"
              tell document WorkDocument to tell sheet WorkSheet
                   make new table with properties {row count:count of DataList, column count:count of item 1 of DataList, name:Client}
                   tell table Client
                        repeat with i from 1 to row count
                             repeat with j from 1 to column count
                                  set t to value of item j of item i of DataList
                                  if class of t is date then set t to t - (time to GMT)
                                  set value of cell j of row i to t as text
                                  --say "column"
                             end repeat
                        end repeat
                   end tell -- table
              end tell -- sheet
         end tell -- Numbers
    end MakeTable
    on GetListOfClients(FileName, TargetColumn)
         local i, FullListOfClient
         tell application "Numbers"
              open ":Users:Master:Documents:" &amp; FileName
              set FullListOfClient to {}
              tell document 1 to tell sheet 1 to tell table 1
                   repeat with i from 2 to count row
                        if value of cell TargetColumn of row i is not in FullListOfClient then copy value of cell TargetColumn of row i to the end of FullListOfClient
                   end repeat
              end tell
         end tell
         return FullListOfClient
    end GetListOfClients
    on GetTable(DocName, TargetValue, TargetColumn)
         local RowCounter, CopyRow
         tell application "Numbers"
              tell document DocName
                   tell table 1 of sheet 1
                        set RowCounter to 1
                        set CopyRow to {}
                        copy cells of row 1 to the end of CopyRow
                        repeat with RowCount from 1 to row count
                             if value of cell TargetColumn of row RowCounter is equal to TargetValue then
                                  copy cells of row RowCounter to the end of CopyRow
                             end if
                             set RowCounter to RowCounter + 1
                        end repeat
                        return CopyRow
                   end tell
              end tell
         end tell
    end GetTable
    --=====
    Creates a new Numbers document from Blank.template
    and returns its name.
    on makeAnNumbersDoc(myTemplate)
         local t, n
         set theApp to "Numbers"
         set t to ((path to applications folder as text) &amp; theApp &amp; ".app:Contents:Resources:Templates:" &amp; myTemplate &amp; ":") as alias
         tell application "Numbers"
              set n to count of documents
              open t
              repeat
                   if (count of documents) > n then
                        exit repeat
                   else
                        delay 0.1
                   end if
              end repeat
              set n to name of document 1
         end tell -- theApp
         return n
    end makeAnNumbersDoc

    Hello
    Then I have no idea why the script hangs after it has done the job.
    Some thoughts.
    • Is it the same in different user account?
    • If you force quit the script, is the resulting new document fine? In other words, is the problem limited to the termination of the script? You can quit a running script by means of i) pressing command + period, which will signal to cancel the execution of the script or ii) killing the process (editor or applet) by Activity Monitor.
    Anyway, I have done some clean up and optimization of your script as listed below although I can see no reason for these changes to solve the current issue. It is just for my testing and liking for low energy consumption.
    Script is revised so that -
    a) it gets the template path indepent of the location of Numbers.app;
    b) it reduces the number of AppleEvents to send for retrieving data from table by means of range reference form (e.g., rows i thru j) and whose filter reference (e.g., rows whose cell i's value = x);
    c) its GetTable() handler now returns 2d arary of values instead of cell references so that it can reduce the number of AppleEvents for dereferencing the cell reference later;
    d) it introduces _main() handler to localise the implicit global variables in run handler (as already explained);
    e) in _main() handler, code is encapsulated in an script object and the script object is executed by "run script" command, which is a known technique to speed up the execution of script when saved as applet. (Actually this only makes the applet run as fast as compiled script run in editor. Without this, applet runs remarkably slower than run in editor.)
    Hope this may be of some help.
    Good luck,
    H
    on run
        _main()
    end run
    on _main()
        script o
            set FileName to "Blank.numbers"
            set ClientColumn to 2
            set CashFlowSheetName to "Cash Flow"
            tell application "Numbers"
                activate
                set WorkDocument to my makeAnNumbersDoc("Blank.nmbtemplate") -- creating a new file
                tell document WorkDocument's sheet 1
                    set name to CashFlowSheetName
                    delete table 1
                end tell
                set Clients to my GetListOfClients(FileName, ClientColumn) -- getting full list of the clients
                --return Clients
                repeat with i from 1 to count of Clients
                    set FullCopy to my GetTable(FileName, item i of Clients, ClientColumn) -- choosing data
                    --return FullCopy
                    my MakeTable(WorkDocument, CashFlowSheetName, FullCopy, item i of Clients) -- making table with name of a client for every client
                end repeat
            end tell -- numbers
            return Clients -- test
        end script
        run script o -- # this will dramatically speed up the execution of script when saved as an applet
    end _main
    on MakeTable(WorkDocument, WorkSheet, DataList, Client)
        local utc_offset, rk, ck
        set utc_offset to time to GMT
        set Client to Client as string -- for safety
        tell application "Numbers"
            set rk to count DataList
            set ck to count DataList's item 1
            tell document WorkDocument's sheet WorkSheet
                make new table with properties {row count:rk, column count:ck, name:Client}
                tell table Client
                    repeat with i from 1 to rk
                        repeat with j from 1 to ck
                            set t to DataList's item i's item j
                            if class of t is date then set t to t - utc_offset
                            set row i's cell j's value to t as text
                        end repeat
                    end repeat
                end tell -- table
            end tell -- sheet
        end tell -- Numbers
    end MakeTable
    on GetListOfClients(FileName, TargetColumn)
        local FullListOfClient
        tell application "Numbers"
            --open (":Users:Master:Documents:" & FileName) as alias
            open ((path to documents folder from user domain as text) & FileName) as alias
            --open ((path to desktop as text) & FileName) as alias -- for test
            set FullListOfClient to {}
            tell document 1's sheet 1's table 1
                repeat with c in (get value of cell TargetColumn of rows 2 thru -1)
                    set c to c's contents
                    if c is not in FullListOfClient then set end of FullListOfClient to c
                end repeat
            end tell
        end tell
        return FullListOfClient
    end GetListOfClients
    on GetTable(DocName, TargetValue, TargetColumn)
        local CopyRow
        tell application "Numbers"
            tell document DocName's sheet 1's table 1
                set CopyRow to value of cell of rows whose cell TargetColumn's value = TargetValue
                set CopyRow's beginning to value of cell of row 1
                return CopyRow
            end tell
        end tell
    end GetTable
    --=====
    Creates a new Numbers document from Blank.template
    and returns its name.
    on makeAnNumbersDoc(myTemplate)
        local t, n
        tell application "Numbers"
            set t to (((path to resource "Templates") as string) & myTemplate) as alias
            set n to count documents
            open t
            repeat until (count documents) > n
                delay 0.1
            end repeat
            return name of document 1
        end tell
    end makeAnNumbersDoc

Maybe you are looking for