[wpkg-users] Java struggle

Rainer Meier r.meier at wpkg.org
Tue Jan 15 12:43:47 CET 2013


Hi Jürgen,

On 15.01.2013 11:59, jurgen.depicker at let.be wrote:
> Thanks Rainer for your stae of the art script collection, beautifully crafted!

You're welcome.


> I plan to use them today if possible, but two questions I would like to ask.
>
> :: Configure which versions to install.
> set INSTALL_JRE6=1
> set INSTALL_JRE7=1
>
> :: Configure whether to install 32-bit and 64-bit VM on 64-bit systems.
> set INSTALL_32_AND_64_BIT=1
>
> -> 32/64bit: what's your idea?  Paul mentioned he doesn't install the 64-bit
> java on any system; you think differently?  Why?
> -> jre6/7: if there's no explicit need for jre6 (some legacy corporate app), can
> jre6 safely be replaced by jre7?  Why do you keep jre6?

You cannot install 64-bit on 32-bit systems. So definitely you cannot install 
64-bit JRE on 32-bit Windows XP.
My script set will install 64-bit edition on Windows x64 and 32-bit edition on 
Windows x86. If you set INSTALL_32_AND_64_BIT=1 then it will install JRE 64-bit 
and 32-bit on Windows x64 (still only installs 32-bit JRE on Windows x86 of course).

I am usually installing both, 32-bit and 64-bit JRE on Windows x64 since some 
32-bit applications cannot find/launch the 64-bit JVM. So they look for 32-bit 
one only.

If you install both then you will have two JVM installed:
64-bit: %ProgramFiles%\Java\jre7
32-bit: %ProgramFiles(x86)%\Java\jre7


Of course you can fully replace JRE 6 with JRE 7 and ONLY install JRE 7. My 
script fully support it by disabling JRE/JDK 6 options. However JRE 7 is not 
100% compatible with JRE 6 (although it should be). Sometimes some corporate 
applications or lagacy applications will not run with JRE 7. Moreover as a 
developer I want to run and compile some applications with a real JDK6 rather 
than cross-compiling which has some issues (like classpath contains JDK7 classes 
which might be missing on customer side running in JRE6). That's why I have 
added the option to also install JRE 6 in parallel. If you don't need it, just 
disable it.

I am not fully sure if the Java browser plugin (which you should activate only 
if really needed due to security) on 32-bit browsers like Firefox works if you 
only install JRE 64-bit. So maybe for this you also need 32-bit JRE installed in 
parallel.

So my advise is to always install as few as possible:
- Only Java 7 (no Java 6 if not required)
- Only 64-bit if no 32-bit browsers and 32-bit applications with Java dependency
   are required.
- Disable browser plugin (btw. I have included a script which is also able to
   remove older Java plugins from Firefox). For Java 7 you can use WEB_JAVA
   setting.


Java is a nice development platform and I even use Maven (Java build system) for 
WPKG deployment but mainly the browser plugin is causing major security hazards 
and since Oracle got it's hands on I really prefer to stay away from it. Luckily 
almost no web page requires it any more. Basically the same story as for Flash. 
Hopefully it's going to disappear like RealPlayer, QuickTime, Silverlight and 
others. Alternatively it might return in much better shape and better design 
(JavaFX anyone?).


br,
Rainer



More information about the wpkg-users mailing list