Link to home
Start Free TrialLog in
Avatar of SnAkEhIpS
SnAkEhIpSFlag for United States of America

asked on

Shared Java Cache...

I've copied the source of a webpage that uses javascript pasted it below. Can someone clarify what is taking place particularly at the point that mentions "Setup shared AnonymousApp java cache"... and what happens if the the OS is Windows 7?

<HTML>
    <HEAD>
    <TITLE>AnonymousApp Windows</TITLE>
    <SCRIPT LANGUAGE="JavaScript">

function Install_WebStart () {  
	alert('On the next dialog that appears,\nselect Run this program from its current location\nand then click the OK button to install the Java 1.5');
	window.location='java_runtime.exe';
}

function Install_LocalCache () {  
    window.location='InstallSystemCacheFiles.jnlp';
}

function XP_Fix () {
   window.location='Cacls_Update.EXE';
}

function WS_Uninstall () {
   window.location='JAVA_WebStart_Uninst.EXE';
}


    </script>

  </HEAD>
  
            
 
      <BODY>
           
           
 
<table align="center" cellpadding="0" cellspacing="0" width="698" border="2" bordercolor="#000000" height="453">
  <tr>
    <td height="433">

<table align="center" border="0" cellpadding="0" cellspacing="0" width="698" height="453">
  <tr>
    <td align="middle" colspan="2" valign="top" height="97" width="698">
      <IMG height=95 src="AnonymousAppLogin_Banner.gif" width="698" align="middle" border="0" >
      </td>
  </tr>
  <tr>
    <td height="356" width="60%" valign="top" align="center" rowspan="2">
      <table border="0" cellpadding="2" width="89%">
        <tr>
          <script language="javascript">
            var Agent = navigator.userAgent;
            var Operating_System = "unknown";
            var MyCount = "1. "
            if (Agent.indexOf("SunOS")!=-1) {Operating_System='Sun'}
            if (Agent.indexOf("Linux")!=-1) {Operating_System='Linux'}                 
            if (Agent.indexOf("Macintosh")!=-1) {Operating_System='Mac'}
            if ((Agent.indexOf("Win16")!=-1)||(Agent.indexOf("Windows 3.1")!=-1)) {Operating_System='Windows 3.1'}
            if ((Agent.indexOf("Win95")!=-1)||(Agent.indexOf("Windows 95")!=-1)) {Operating_System='Windows 95'}
            if ((Agent.indexOf("Win98")!=-1)||(Agent.indexOf("Windows 98")!=-1)) {Operating_System='Windows 98'}
            if ((Agent.indexOf("WinNT")!=-1)||(Agent.indexOf("Windows NT")!=-1)) {Operating_System='Windows NT 4'}
            if ((Agent.indexOf("WinNT5")!=-1)||(Agent.indexOf("Windows NT 5.0")!=-1)) {Operating_System='Windows 2000'}
            if ((Agent.indexOf("WinNT5")!=-1)||(Agent.indexOf("Windows NT 5.1")!=-1)) {Operating_System='Windows XP'}
            if ((Agent.indexOf("WinNT5")!=-1)||(Agent.indexOf("Windows NT 5.2")!=-1)) {Operating_System='Windows 2003 Server'}
            if ((Agent.indexOf("WinNT6")!=-1)||(Agent.indexOf("Windows NT 6.0")!=-1)) {Operating_System='Windows Vista or 2008'}
            document.write ('<tr height="32" align="center"><font face="Arial" size="4" color="White"><br></font></tr>');
            document.write ('<tr height="32" align="center"><font face="Arial" size="5" color="Blue"><b>Anonymous<i>App</i> Client Setup Steps for  ' + Operating_System + '</b></font></tr>');
            document.write ('<tr height="32" align="center"><font face="Arial" size="5" color="White"><br></font></tr>');
            if (Operating_System.substr (0,7) == 'Windows') {document.write ('<tr height="32" align="center"> <font face="Arial" size="4"><u><i>NOTE</i></u>: You need to do these steps only once. 

If you used an AnonymousApp Client Installation CD for AnonymousApp 3.X, you do not need to perform these steps.</font></a></tr>')}  
            if (Operating_System.substr (0,7) == 'Windows') {document.write ('<tr height="32" align="center"><font face="Arial" size="4" color="White"><br></font></tr>')}  
            if (Operating_System.substr (0,7) == 'Windows') {document.write ('<tr height="32" align="center"> <a href="javascript:Install_WebStart();"><font face="Arial" size="4" color="#ff0000">1. 

Install Java Runtime Environment 5.0</font></a></tr>')}  
            if (Operating_System.substr (0,7) == 'Windows') {document.write ('<tr height="32" align="center"><font face="Arial" size="4" color="White"><br></font></tr>')}  
            if (Operating_System.substr (0,7) == 'Windows') {document.write ('<tr height="32" align="center"> <a href="javascript:Install_LocalCache();"><font face="Arial" size="4" 

color="#ff0000">2. Setup shared AnonymousApp Java cache</font></a></tr>')}  
            if (Operating_System.substr (0,7) == 'Windows') {document.write ('<tr height="32" align="center"><font face="Arial" size="4" color="White"><br></font></tr>')}  
            if (Operating_System == 'Windows XP') {document.write ('<tr height="32" align="center"><a href="javascript:XP_Fix();"><font face="Arial" size="4" color="#ff0000">3. Setup AnonymousApp 

to be used by non-administrators</font> </a>')}
            if (Operating_System == 'Windows Vista or 2008') {document.write ('<tr height="32" align="center"><a href="javascript:XP_Fix();"><font face="Arial" size="4" color="#ff0000">3. Setup 

AnonymousApp to be used by non-administrators</font> </a>')}
          </script>

        </tr>
      </table>
        </tr>
      </table>

     </BODY>

</HTML>

Open in new window

Avatar of gheist
gheist
Flag of Belgium image

It is sort of script embedded in installer.
Has nothing to do with java as such. Probably it sets up something like catalina tmp directory for application.
Avatar of SnAkEhIpS

ASKER

You are on the right track, if not correct. I'm just not fully understanding something.

On the website there are sequential instructions for the user:

1. Install Java Runtime Environment 5.0
2. Setup Shared AnonymousApp Java Cache

Specifically, I don't understand what #2 is doing post-installation of the Java Runtime Environment.
Dont install java runtime environment 5. it is super insecure and obsolete.
I'm with you there, but It's not up for debate. It's a requirement in order to access a specific public sector web-app.

The point of my post is to determine what is taking place in #2, post-installation of the JRE.
If you install JRE7 or later it will wipe all past java versions from your disk/
I appreciate your comment, but this isn't the point of my post. The point of my post is to determine what is taking place in #2, post-installation of the JRE.
Can you find supporting documentation for your public sector webapp and give me to read it. It was already enough rocket science to guess that your script is extracted from some installer.
Is that an expert comment?
YES. You show anonymous product, ask for java shared cache (I dont know - java has plugin jar cache, nothing else)
So in rocket science terminology, "it's calling a javascript function, but you don't know what that function is or does". Correct?
jnlp is application descriptor for java web start.
ASKER CERTIFIED SOLUTION
Avatar of SnAkEhIpS
SnAkEhIpS
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think I answered my own question as best it could be answered. I would remove it entirely from the forum if I didn't think it might be of some help to someone else.