<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/wordpress-mu-1.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: OS X Java version changing script</title>
	<link>http://blog.generationjava.com/roller/bayard/entry/os_x_java_version_changing</link>
	<description></description>
	<pubDate>Thu, 04 Dec 2008 19:42:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=wordpress-mu-1.2.1</generator>

	<item>
		<title>By: Jan Mat?rne</title>
		<link>http://blog.generationjava.com/roller/bayard/entry/os_x_java_version_changing#comment-65</link>
		<author>Jan Mat?rne</author>
		<pubDate>Tue, 16 May 2006 00:11:33 +0000</pubDate>
		<guid>http://blog.generationjava.com/roller/bayard/entry/os_x_java_version_changing#comment-65</guid>
		<description>Maybe not as dynamic as yours (and for Windows) - but used the same technique for over a year and it works well. So I could compile Ant on a 1.2 or a 1.5 base (nice to see all the 1.5-deprecated stuff which was 'new' in 1.2).


@echo off
set JAVA_BASE=c:\jdk
if "%1"=="help" goto help

set JHOME=%JAVA_BASE%\%1
if "%1"=="160"   set JHOME=%JAVA_BASE%\160_2004Nov
if "%1"=="150"   set JHOME=%JAVA_BASE%\150
....
if "%1"==""      set JHOME=C:\Programme\Java\j2sdk1.4.2_04
goto end

:help
echo setjava  - Set the Java-Version
echo .
echo                      1.4.2_04
echo  15  160  160_snap   1.6.0-Snapshot
echo  15  150  150_b2     1.5.0
...
goto end2

:end
if exist %JHOME%\bin\javac.exe goto setJavaHome
echo %JHOME%\bin\javac.exe not found. No changes done.
goto end2

:setJavaHome
set JAVA_HOME=%JHOME%
call cleanPath.pl PATH _clean_.bat -add %JAVA_HOME%\bin -del jdk
call _clean_.bat
del  _clean_.bat
echo Java-Home: %JAVA_HOME%
call java -version
goto end2

:end2
set JAVA_BASE=
set JHOME=




Oh the 'cleanPath.pl' is a small perl skript which can add and remove entries (regexp based) from the PATH variable. Nice to clean that stuff ...</description>
		<content:encoded><![CDATA[<p>Maybe not as dynamic as yours (and for Windows) - but used the same technique for over a year and it works well. So I could compile Ant on a 1.2 or a 1.5 base (nice to see all the 1.5-deprecated stuff which was &#8216;new&#8217; in 1.2).</p>
<p>@echo off<br />
set JAVA_BASE=c:\jdk<br />
if &#8220;%1&#8243;==&#8221;help&#8221; goto help</p>
<p>set JHOME=%JAVA_BASE%\%1<br />
if &#8220;%1&#8243;==&#8221;160&#8243;   set JHOME=%JAVA_BASE%\160_2004Nov<br />
if &#8220;%1&#8243;==&#8221;150&#8243;   set JHOME=%JAVA_BASE%\150<br />
&#8230;.<br />
if &#8220;%1&#8243;==&#8221;"      set JHOME=C:\Programme\Java\j2sdk1.4.2_04<br />
goto end</p>
<p>:help<br />
echo setjava  - Set the Java-Version<br />
echo .<br />
echo                      1.4.2_04<br />
echo  15  160  160_snap   1.6.0-Snapshot<br />
echo  15  150  150_b2     1.5.0<br />
&#8230;<br />
goto end2</p>
<p>:end<br />
if exist %JHOME%\bin\javac.exe goto setJavaHome<br />
echo %JHOME%\bin\javac.exe not found. No changes done.<br />
goto end2</p>
<p>:setJavaHome<br />
set JAVA_HOME=%JHOME%<br />
call cleanPath.pl PATH _clean_.bat -add %JAVA_HOME%\bin -del jdk<br />
call _clean_.bat<br />
del  _clean_.bat<br />
echo Java-Home: %JAVA_HOME%<br />
call java -version<br />
goto end2</p>
<p>:end2<br />
set JAVA_BASE=<br />
set JHOME=</p>
<p>Oh the &#8216;cleanPath.pl&#8217; is a small perl skript which can add and remove entries (regexp based) from the PATH variable. Nice to clean that stuff &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Holsman</title>
		<link>http://blog.generationjava.com/roller/bayard/entry/os_x_java_version_changing#comment-64</link>
		<author>Ian Holsman</author>
		<pubDate>Mon, 15 May 2006 20:15:07 +0000</pubDate>
		<guid>http://blog.generationjava.com/roller/bayard/entry/os_x_java_version_changing#comment-64</guid>
		<description>Thanks!
I was looking for something like this so I could run opentaps on my laptop (which required 1.4.2) and solr (which needs 1.5)</description>
		<content:encoded><![CDATA[<p>Thanks!<br />
I was looking for something like this so I could run opentaps on my laptop (which required 1.4.2) and solr (which needs 1.5)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
