Wednesday Jun 18, 2008

Java Deployment Toolkit - 6u10

Java Deployment Toolkit, yes again I am talking of 6u10. It deploy applets and applications to a large variety of clients with JS. I have written some one liner which has some great capability to do:

<HTML>
<BODY>
<script src="http://java.com/js/deployJava.js">
deployJava.installLatestJRE();
</script>
</BODY>
</HTML> 

It looks small code but it can install the latest JRE on your machine. Just copy paste the code in a HTML page and run it. And here is the second one:

<HTML>
<BODY>
<script src="http://java.com/js/deployJava.js"></script>
<script>
    var list = deployJava.getJREs();
        var result = "";
           result = list[0];
        for (var i=1; i<list.length; i++) {
                result += ", " + list[i];
        }
            alert("You have the following Java Platform(s) installed: \\n" + result);
</script>
</BODY>
</HTML> 

This code will tell you the installed JRE's on your machine.  In all this game, the important thing is deployJava.js which has lot of other cool method. Check the link in the code for details :-). We just need to use those functions for our need. There are some better example is on sun site.


About

Hi, I am Vaibhav Choudhary working in Sun. This blog is all about simple concept of Java and JavaFX.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today