HTA starting continual applet



following problem:
--------------------------
a Java-applet shall " program.exe " on my computer to running.
That is not allowed to it.
But I would it so.
It is only for me.


here is the code from applet:
-----------------------------------------
// This is Exec1.java(class)
import java.util.*;
import java.io.*;

public class Exec1 extends java.applet.Applet implements Runnable
{
Thread runner;
public void start()
{
if (runner==null)
{
runner = new Thread(this);
runner.start();
}
}

public void run()
{
Thread thisThread = Thread.currentThread();
while (runner == thisThread)
{
try
{
//the Applet call Program "Setup.exe"
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("setup.exe");
}
catch(Throwable t)
{
t.printStackTrace();
}
}
}
}

The applet shall in a "Website.HTA" (a HTML-Application) to run.
So, I avoid the security-facilities of the Browsers.

Here is the code from "Website.HTA" :
----------------------------------------------------

<html>
<head>
<title>Datei.hta</title>
<script type="text/javascript"></script>
</head>


<body>
<p> Test.HTA, EXE-Programm shall per HTA to run


<APPLET CODE=Exec1></APPLET>
<script>
//Javascript close "website.HTA", because loads the applet the program
continual
self.focus()
self.close()

</script>

</body>
</html>

What does my applet ?
it loads and it loads and it loads... until my RAM - memory is exhaust.

How can I write my program , in order to tell the applet, the " Program.exe
" shall store it only once loads

Thanks,


wilfried.pz
in Germany


.



Relevant Pages

  • Re: thread/interrupt question
    ... the same function "public void start". ... //Put YourClass and Runner in the same file! ... class Runner extends Thread ... I am writing an applet and I spawn a thread when a certain menu item is ...
    (comp.lang.java.help)
  • Applet Hangs when submitting data to servlet
    ... on our web server. ... applet that demonstrates the problem. ... private JButton theSubmitButton_, theClearButton_; ... public void actionPerformed ...
    (comp.lang.java.programmer)
  • Re: Applet Hangs when submitting data to servlet
    ... on our web server. ... applet that demonstrates the problem. ... private JButton theSubmitButton_, theClearButton_; ... public void actionPerformed ...
    (comp.lang.java.programmer)
  • Re: Applet Hangs when submitting data to servlet
    ... on our web server. ... applet that demonstrates the problem. ... private JButton theSubmitButton_, theClearButton_; ... public void actionPerformed ...
    (comp.lang.java.programmer)
  • Re: How to open the jsp pages by click on the APPLET
    ... I want to know is there is any way to open the new window of jsp ... requirement.Will give syntax for getting jsp page on applet. ... public void actionPerformed{ ... int prevDragY; // previous position of the mouse. ...
    (comp.lang.java.advocacy)