DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Java - Critical Patch Released  (Read 10,815 times)

Tinman57

  • Duck! It's another MicroSoft Patch!
  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,702
    • Military Service Badge - US Air Force
Java - Critical Patch Released
« on: February 05, 2013, 01:03 AM »
Forget the Super Bowl. Critical Java patch released; update now

Quote
Oracle has released a critical Java update that fixes more than 50 security vulnerabilities. Considering the ruckus over the past fortnight, along with repeated warnings from the U.S. Dept. of Homeland Security, you should update Java as soon as possible.

http://www.zdnet.com/forget-the-super-bowl-critical-java-patch-released-update-now-7000010732
((((TINMAN))))

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: Java - Critical Patch Released
« Reply #1 on: February 05, 2013, 06:33 AM »
Thanks for the heads up.

On a related note, the PortableApps.com packaging of JRE seemed up-to-date already:

 http://portableapps.com/apps/utilities/java_portable

IainB

  • @Slartibartfarst
  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,544
Re: Java - Critical Patch Released
« Reply #2 on: February 10, 2013, 09:21 AM »
Thanks for this alert.
I took the opportunity to expunge all the Java-related crud (there was a lot of it) that I had accumulated on my laptop, and install the latest release and runtime environment in a relatively clean fashion. I hope I don't regret doing that, but then I reckoned (rightly or wrongly) that all that old Java stuff could have been a potential risk if I had left it in situ.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,861
Re: Java - Critical Patch Released
« Reply #3 on: February 10, 2013, 03:17 PM »
Thanks for this alert.
I took the opportunity to expunge all the Java-related crud (there was a lot of it) that I had accumulated on my laptop, and install the latest release and runtime environment in a relatively clean fashion. I hope I don't regret doing that, but then I reckoned (rightly or wrongly) that all that old Java stuff could have been a potential risk if I had left it in situ.

You reckoned correctly.  :) :Thmbsup:

Per Oracle on their Why should I uninstall older versions of Java from my system? page

Quote
The latest version of Java is always the recommended version as it contains feature updates, vulnerability fixes and performance improvements to previous versions. You can confirm that you have the latest version by visiting the Java Verification page.

Over time, you may have installed multiple versions of Java to run available Java content. In the past, each Java update was installed in a separate directory on your system. However, Java updates are now installed in a single directory.

Should I uninstall older versions of Java?

We highly recommend users uninstall all older versions of Java from your system.
Keeping old and unsupported versions of Java on your system presents a serious security risk.
Uninstalling older versions of Java from your system ensures that Java applications will run with the most up-to-date security and performance improvements on your system.

You can always use a nice little free utility by SingularLabs called JavaRa to help you maintain Java Runtime on your system. Recommended! :up: :up:

[attach]

cyberdiva

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,041
Re: Java - Critical Patch Released
« Reply #4 on: February 10, 2013, 03:24 PM »
40hz, have you used JavaRa?  It sounds useful, but I'd like to know that it won't create problems (e.g., wrong removals from the Registry).  I'd feel more comfortable installing and using it if I knew that you and/or other DC folks had some good experiences with it.  Perhaps I should change my username from cyberdiva to Nervous Nelly  :( 

Krishean

  • I like pie
  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 75
    • Participated in NANY Challenge Three Times
Re: Java - Critical Patch Released
« Reply #5 on: February 10, 2013, 03:34 PM »
DO NOT USE JavaRa it will break JavaScript in IE (and any embedded browsers that applications use) by deleting registry keys unrelated to Java. It goes after some of the things in the registry that just have java in the name, but are actually part of JavaScript. I found this out the hard way. the specific keys are:

HKCR\JavaScript
HKCR\JavaScript Author
HKCR\JavaScript1.1
HKCR\JavaScript1.1 Author
HKCR\JavaScript1.2
HKCR\JavaScript1.2 Author

Looks like this has been fixed since then: http://forums.lunarsoft.net/topic/4984-major-bug-in-javara-116-now-fixed/
Any sufficiently advanced technology is indistinguishable from magic.

- Arthur C. Clarke

Krishean

  • I like pie
  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 75
    • Participated in NANY Challenge Three Times
Re: Java - Critical Patch Released
« Reply #6 on: February 10, 2013, 03:45 PM »
I have a batch script that attempts to purge java from your system, and cleanly install whatever version you specify, just place the scripts in the same directory as the JRE installers downloaded from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html and update the variables at the top to match whatever version you are installing. This also works when installing from network shares.

install-java.bat:
Code: (generic)
@echo off
rem set product=jre6
rem set version=6u39
set product=jre7
set version=7u13
set base=%~dp0
cls
title Java %version% Installer
set /P auth=Continue? (Y/N): 
if /I "%auth%" NEQ "Y" goto end
cls
title Removing old versions...
echo Please wait...
cscript /nologo "%base%remove-java.js"

ver | find "Version 6." >nul
if "%errorlevel%" == "0" goto v6
ver | find "Version 5." >nul
if "%errorlevel%" == "0" goto v5
echo Unsupported Operating System
pause
exit
rem process folders specific to vista/7
:v6
if exist "%SystemDrive%\Users" (
	setlocal EnableDelayedExpansion
	set ProfileDir=%SystemDrive%\Users
	for /f "tokens=*" %%a in ('dir /b "!ProfileDir!"') do (
		if exist "!ProfileDir!\%%a\AppData\LocalLow\Sun" (
			echo.Removing "!ProfileDir!\%%a\AppData\LocalLow\Sun"
			rmdir /s /q "!ProfileDir!\%%a\AppData\LocalLow\Sun"
		)
	)
	endlocal
)
if exist "%userprofile%\AppData\LocalLow\Sun" (
	echo.Removing "%userprofile%\AppData\LocalLow\Sun"
	rmdir /s /q "%userprofile%\AppData\LocalLow\Sun"
)
if exist "%SystemDrive%\ProgramData\Sun" (
	echo.Removing "%SystemDrive%\ProgramData\Sun"
	rmdir /s /q "%SystemDrive%\ProgramData\Sun"
)
goto common
rem process folders specific to xp
:v5
if exist "%SystemDrive%\Documents and Settings" (
	setlocal EnableDelayedExpansion
	set ProfileDir=%SystemDrive%\Documents and Settings
	for /f "tokens=*" %%a in ('dir /b "!ProfileDir!"') do (
		if exist "!ProfileDir!\%%a\Application Data\Sun" (
			echo.Removing "!ProfileDir!\%%a\Application Data\Sun"
			rmdir /s /q "!ProfileDir!\%%a\Application Data\Sun"
		)
	)
	endlocal
)
if exist "%userprofile%\Application Data\Sun" (
	echo.Removing "%userprofile%\Application Data\Sun"
	rmdir /s /q "%userprofile%\Application Data\Sun"
)
:common
if exist "%SystemRoot%\Sun" (
	echo.Removing "%SystemRoot%\Sun"
	rmdir /s /q "%SystemRoot%\Sun"
)
set dj1=%SystemRoot%\system32\deployJava1.dll
if exist "%dj1%" (
	echo.Removing "%dj1%"
	regsvr32 /s /u "%dj1%"
	del /f /q "%dj1%"
)
set npdj1=%SystemRoot%\system32\npdeployJava1.dll
if exist "%npdj1%" (
	echo.Removing "%npdj1%"
	del /f /q "%npdj1%"
)

title Java %version% Installing...
rem We always install the x86 version of Java. Note the order of installation. If x86 is installed before x64 some x86 apps do not work.
rem This can be remedied by reinstalling the x86 version, but why encounter the problem? Just install x64 before x86 versions of Java.
if "%PROCESSOR_ARCHITECTURE%"=="amd64" goto x64
if "%PROCESSOR_ARCHITEW6432%"=="amd64" goto x64
:x86
"%base%jre-%version%-windows-i586.exe" /s REBOOT=Suppress IEXPLORER=1 MOZILLA=1
goto clean
:x64
"%base%jre-%version%-windows-x64.exe" /s REBOOT=Suppress IEXPLORER=1 MOZILLA=1
goto x86
:clean
title Cleaning up...
rem remove Java Quick Starter
rem sc stop JavaQuickStarterService
rem sc delete JavaQuickStarterService
net stop JavaQuickStarterService
if exist "%ProgramFiles%\Java\%product%\bin\jqs.exe" "%ProgramFiles%\Java\%product%\bin\jqs.exe" -unregister
if exist "%ProgramFiles(x86)%\Java\%product%\bin\jqs.exe" "%ProgramFiles(x86)%\Java\%product%\bin\jqs.exe" -unregister
rem Remove Java Auto Updater software
msiexec /qn /x {4A03706F-666A-4037-7777-5F2748764D10}
title Java %version% Installed.
pause
:end
@exit

and the accompanying javascript, remove-java.js:
Code: (javascript)

function echo(a){return WScript.Echo(a);}
function exit(a){return WScript.Quit(a);}

var Registry=(function(){
	
//	this.HKEY_CLASSES_ROOT 		= 0x80000000;
//	this.HKEY_CURRENT_USER 		= 0x80000001;
	this.HKEY_LOCAL_MACHINE 	= 0x80000002;
//	this.HKEY_USERS 		= 0x80000003;
//	this.HKEY_CURRENT_CONFIG 	= 0x80000005;
	
//	this.Types = new Array(
//	    '                              ',    // 0
//	    'REG_SZ                        ',    // 1
//	    'REG_EXPAND_SZ                 ',    // 2
//	    'REG_BINARY                    ',    // 3
//	    'REG_DWORD                     ',    // 4
//	    'REG_DWORD_BIG_ENDIAN          ',    // 5
//	    'REG_LINK                      ',    // 6
//	    'REG_MULTI_SZ                  ',    // 7
//	    'REG_RESOURCE_LIST             ',    // 8
//	    'REG_FULL_RESOURCE_DESCRIPTOR  ',    // 9
//	    'REG_RESOURCE_REQUIREMENTS_LIST',    // 10
//	    'REG_QWORD                    ');    // 11
	
	this.oRegistry=GetObject('winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\default:StdRegProv');
	this.Exec=function(method,hkey,sRegPath,sValueName){
		var oMethod = this.oRegistry.Methods_(method);
		var oInParam = oMethod.InParameters.SpawnInstance_();
		oInParam.hDefKey = hkey;
		oInParam.sSubKeyName = sRegPath;
		if(sValueName != null)oInParam.sValueName = sValueName;
		return this.oRegistry.ExecMethod_(oMethod.Name, oInParam);
	};
	this.EnumKey=function(sRegPath){
		var oOutParam = this.Exec('EnumKey', this.HKEY_LOCAL_MACHINE, sRegPath);
		return oOutParam.sNames.toArray();
	};
	this.EnumValues=function(sRegPath){
		var oOutParam = this.Exec('EnumValues', this.HKEY_LOCAL_MACHINE, sRegPath);
		var aNames = oOutParam.sNames.toArray();
		var aTypes = oOutParam.Types.toArray();
		var ret=[];
		for(var i=0;i<aNames.length;i++){
			ret.push({'Name': aNames[i], 'Type': aTypes[i]});
		}
		return ret;
	};
//	this.GetDWORDValue=function(sRegPath,sValueName){
//		var oOutParam = this.Exec('GetDWORDValue', this.HKEY_LOCAL_MACHINE, sRegPath, sValueName);
//		return oOutParam.uValue;
//	};
//	this.GetExpandedStringValue=function(sRegPath,sValueName){
//		var oOutParam = this.Exec('GetExpandedStringValue', this.HKEY_LOCAL_MACHINE, sRegPath, sValueName);
//		return oOutParam.sValue;
//	};
	this.GetStringValue=function(sRegPath,sValueName){
		var oOutParam = this.Exec('GetStringValue', this.HKEY_LOCAL_MACHINE, sRegPath, sValueName);
		return oOutParam.sValue;
	};
	return this;
})();

exit(main());
function main(){
	
	var wshell=WScript.CreateObject('WScript.Shell');
	
	//echo(Registry.EnumKey(sRegPath).join('\n'));
	
	var sRegPath = 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall';
	try{
		var items = Registry.EnumKey(sRegPath);
	}catch(err){
		var items = [];
	}
	for(var i=0;i<items.length;i++){
		//echo(items[i]);
		try{
			var props = Registry.EnumValues(sRegPath+'\\'+items[i]);
		}catch(err){
			var props = [];
		}
		for(var j=0;j<props.length;j++){
			if(props[j].Name == 'DisplayName'){
				var value = Registry.GetStringValue(sRegPath+'\\'+items[i], props[j].Name);
				// jre6 and jre7, older versions have to be manually dealt with
				if((/^Java(\(TM\))? \d( Update \d+)?$/).test(value)){
					wshell.Run('msiexec /qn /norestart /x '+items[i],0,true);
				}
			}
			
			/*var v=props[j].Type;
			switch(props[j].Type){
				case 1:
					v=Registry.GetStringValue(sRegPath+'\\'+items[i],props[j].Name);
					break;
				case 2:
					v=Registry.GetExpandedStringValue(sRegPath+'\\'+items[i],props[j].Name);
					break;
				case 4:
					v=Registry.GetDWORDValue(sRegPath+'\\'+items[i],props[j].Name);
					break;
				default:break;
			}
			//echo('\t'+props[j].Name + ': ' + v);
			
			if(props[j].Name == 'DisplayName' && typeof(v)=='string' && 
			    // jre6 and jre7, older versions have to be manually dealt with
			    (/^Java\(TM\) \d( Update \d+)?$/).test(v)){
				echo('msiexec /qn /norestart /x '+items[i]);
			}*/
		}
		
	}
	
	// handle 32-bit software installed on a 64-bit system
	var sRegPath = 'SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall';
	try{
		var items = Registry.EnumKey(sRegPath);
	}catch(err){
		var items = [];
	}
	for(var i=0;i<items.length;i++){
		try{
			var props = Registry.EnumValues(sRegPath+'\\'+items[i]);
		}catch(err){
			var props = [];
		}
		for(var j=0;j<props.length;j++){
			if(props[j].Name == 'DisplayName'){
				var value = Registry.GetStringValue(sRegPath+'\\'+items[i], props[j].Name);
				// jre6 and jre7, older versions have to be manually dealt with
				if((/^Java\(TM\) \d( Update \d+)?$/).test(value)){
					wshell.Run('msiexec /qn /norestart /x '+items[i],0,true);
				}
			}
		}
	}
	
	return 0;
	
//	var wmi=GetObject('winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2');
//	var query='SELECT * FROM Win32_Product';
//	//var query='SELECT * FROM Win32_PhysicalMemory';
//	var en=new Enumerator(wmi.ExecQuery(query));
//	for(en.moveFirst();!en.atEnd();en.moveNext()){
//		var itm = en.item();
//		echo('Name: '+itm.Name);
//		/*var props = new Enumerator(itm.Properties_);
//		for(props.moveFirst();!props.atEnd();props.moveNext()){
//			var p = props.item();
//			echo(p.Name + ': ' + p.Value);
//		}*/
//	}
//	return 0;
}
Any sufficiently advanced technology is indistinguishable from magic.

- Arthur C. Clarke

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,861
Re: Java - Critical Patch Released
« Reply #7 on: February 10, 2013, 08:36 PM »
40hz, have you used JavaRa?  It sounds useful, but I'd like to know that it won't create problems (e.g., wrong removals from the Registry).  I'd feel more comfortable installing and using it if I knew that you and/or other DC folks had some good experiences with it.  Perhaps I should change my username from cyberdiva to Nervous Nelly  :(  

@CD- Nope. Maybe Smart Lady but certainly not Nervous Nelly. ;D

And yes, I use it. I don't recommend anything I don't have direct experience with. If I've only read or heard about something - and I'm passing it on as an FYI - I'll always say so.  :Thmbsup:

The new version of JavaRa uses a database and an updater to stay on top of what Oracle gets up to with new Java releases. I haven't had any problems using it either on my own systems or those of my clients.

But it's mostly a convenience tool. You could always just uninstall any old versions of the JRE through Windows' own add/remove programs control panel - and then download and install the newest version from Oracle.

Where JavaRa really does sing, however, is when the JRE balks at being uninstalled. Or if fails to uninstall cleanly - as some versions occasionally do on some machines. JavaRa has the option to scrub out all things JRE,  leaving you with a clean slate to put a fresh copy on.

It's like what's been said about tennis racquets - you don't often need one... but when you do, there's really no direct substitute.

Although now that Krishean has been kind enough to share that script I guess that isn't the case any more. :)

-----
@ Krishean - thx for sharing that. Looks useful. And an interesting script to read through too. :Thmbsup:

« Last Edit: February 10, 2013, 08:41 PM by 40hz »

cyberdiva

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,041
Re: Java - Critical Patch Released
« Reply #8 on: February 10, 2013, 11:54 PM »
Thanks very much, Krishean and 40hz.  I've decided that for now, I don't need JavaRa.  However, I'm glad to know about your script, Krishean. 

Tinman57

  • Duck! It's another MicroSoft Patch!
  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,702
    • Military Service Badge - US Air Force
More Java Patches Due Soon
« Reply #9 on: February 11, 2013, 12:10 AM »
More Java Patches Due Soon

Oracle isn't done releasing patches for Java SE this month, as another batch will arrive on February 19, according to a company blog post.

http://www.pcworld.com/article/2027766/more-java-patches-due-soon.html
((((TINMAN))))

Original address: https://www.donationcoder.com/forum/index.php?topic=33919.0