Activating Java Deployment Toolkit when working with applets - java

I have java applet and it generates some data ( x,y,z) . I want to pass this data to JavaScript . But everytime i run the applet program, browser doesn't allow me to run that program. I tried in mozilla, IE, Google Chrome etc and all of them are updated.
It says "Activate Java Deployment Toolkit " but which we cannot activateon our browser. It has got no option for activation.
Please tell me what's going on here.

Related

Can Java webstart dialog caption be overridden?

I have an Angular web application as well as a client JavaFX program that I host on an IIS 7 web server. When user clicks on a link on a page in the web app, I construct the proper JNLP file and send it down to the browser. The client browser then opens the JNLP file and the app loads and then opens properly. No issues.
But the webstart dialog that appears after clicking on the link shows a progress bar as it downloads the java application from the server, and it's got a caption that says 'JavaFX Application Preview'. I'd much rather have it say the name of the software the user is downloading. Is this possible? If so, where should I start looking?
I hunted online and couldn't find a single mention of this, which I find really surprising. Surely this has come up before?
Create a custom Preloader and in the start method of the preloader, set the title of the preloader stage.

Applet executing program on server

I've got an applet, which has to exec a program on the same server.
Runtime c = Runtime.getRuntime();
window.finishedQuery("Got Runtime...");
Process p = c.exec(String.format("cmd");
window.finishedQuery("Excecuted CMD");
2nd line doesn't work in the browser, but in the Netbeans applet viewer it does.
window is my applet, and it does show got runtime but not excecuted CMD.
In Google chrome I see the following message:
access denied ("java.io.FilePermission" "<<ALL FILES>>" "execute")
I guess the applet "thinks" that I want to get access to the users PC/programs, but I want to start a program on the server.
What do I have to do?
If created by the applet, the Process will be created in the JVM of the client machine. That VM will not be able to call methods on the server.
The best way to approach this is to have the sand-boxed applet call home to a web-service (servlet, JSP, PHP, ASP..) on the same host it comes from. Have the web-service create the Process1, and provide the output to the applet for consumption/display.
1.
Also, go through the Java World article linked from the runtime.exec Wiki & implement all the recommendations, but for 1.5+ use a ProcessBuilder to create the Process.
Okay, i wrote a service to create the process and created a "client-class" via wsimport...everything works fine in netbeans applet manager, but when i start the applet in my browser, the applet doesnt request the service, even when i put my applett on a local webserver(xampp) and start the service on the same client. i thought if both are on the same client, i dont have to sign my applet?
(note sure if i have to make this a new question or an answer to my question...)

How we can open browser through j2me code in ubuntu os?

How we can open browser through Java ME code in ubuntu os ?
I am using the below given code
String URL1="any url";
midlet.platformRequest(URL1);
The above line does not open the browser in the UBUNTU 10.10 but its working fine on windows os.
Please help me if any body else have faced the same problem.
if you use emulator (which one?), check if it is properly configured (emulators tend to have stuff like that in User Guide y'know)
eg this article provides a recipe for WTK / ME SDK:
...The J2ME Wireless Toolkit supports the platformRequest() method, but
before using the method you must tell the toolkit what to do when it's
invoked. You can associate only one platform service with
platformRequest(). For instance, if for testing purposes you associate
the method with your browser, the browser will be launched every time
you call platformRequest(). If you need more flexibility, you can
associate platformRequest() with a script that will use the URL
scheme to route the request to the right handler.
To associate a particular platform service with platformRequest(),
simply add a com.sun.midp.midlet.platformRequestCommand attribute to
the system.config file in the toolkit's lib directory. For example, to
invoke the Mozilla browser whenever platformRequest() is called, add
the following to system.config:
# Associate the Mozilla browser with platformRequest() - Windows
com.sun.midp.midlet.platformRequestCommand: "C:\Program Files\mozilla.org\Mozilla\mozilla.exe"
Given this setting, the call
platformRequest("http://developers.sun.com/mobility") will launch
Mozilla, and the browser will navigate to Sun's developer mobility
portal...

Java applet and web browsers

i am doing a master project on how java applet works with web browsers.Can anyone give me details or any link that can be useful.How the web browser interacts with the java applet.
Download the source of Mozilla (Firefox, e.g.)
Read the code that integrates the JRE for applets.
Ask more questions when specific issues arise.
Maybe a simple answer will be enough and it won't require reverse-engineering Mozilla.
Until recently, applets did not interact much with the browser. The browser sent only 'start', 'stop' and 'resize' events to the applet and the applet could order the browser to open new web pages. With the Java 6 update 10, there is a possibility to call Applet functions from JavaScript and to call JavaScript from an Applet, as long as they are on the same page.
The browser creates a 'sandbox' to run the applet. The sandbox limits the access rights of the applet (e.g. applet can connect to TCP ports only on the web server, cannot access files directly on the client file system, etc.). Besides these limitations, an applet is like an autonomous application running on the client box.
You can find info on applets at 'http://java.sun.com/applets/' and 'http://java.sun.com/docs/books/tutorial/deployment/applet/index.html'

WebBrowser1 problem with external web app

the external Application works good in IE so i know the problem is inside My App.
The external web app is java applet and java script based, and the problem im experiensing is when the java applet tryes to run a java script. The Applet opens a seconday window with a java script and tryes to do some operations but then i just stops. And my Application seems to be non responsive and i have to restart it.
in IE it works just fine, the java applet opens the window does its thing and updates back in to the Applet.
anyone know why it not working in the webBrowser control?
Two scenerio could be possible:
1) whenever we opens the web site in web browser control any previous session(authentication) cookie is not being reused, and new session will be created.
2) you have to override the eventhandler webBrowser_newWindow to allow opening the new window.

Categories