Properly Streaming a Java or JNLP Application (Java client / Deployment settings in enterprise environment) – part 3

26 06 2013

After a long hiatus from this blog and being busy busy busy in other projects it’s time to complete this guide,
Part 1: JNLP Applets and Application streaming
Part 2: http://wp.me/piZFv-3e

Beginning from the a certain JRE version options became available for the JNLP cache to be either in USER or SYSTEM context,
This provides a huge advantage for us administrators to deliver an application on a System context on machines, such as XenApp Servers, Multi-User workstations and of course streamed environment.
Please note: I will refer to Citrix Application Streaming version but the principles apply to other virtualization technologies.

Let’s get on with it, what we want to do is instead of having the user go in to the application and have the JNLP cached to the user context we will want to either set rules for the caching in the JRE or pre-cache it for them on a SYSTEM context and have it available for all users on that machine.

We can do that by using the following JRE tools:

deployment.config – this file when placed in a certain location can pre-determine the configuration of the JRE environment
Location: C:\Windows\Sun\Java\Deployment


#deployment.properties
deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
deployment.system.config.mandatory=True

deployment.properties – this file when placed in a certain location can pre-determine the cache folder location
Location: C:\Windows\Sun\Java\Deployment


#deployment.properties
#Wed Aug 15 22:05:15 IDT 2012
deployment.system.cachedir=C:\\Java_System_Cache
deployment.cache.enabled=True
deployment.version=6.0
deployment.console.startup.mode=SHOW
deployment.javaws.viewer.bounds=360,189,720,360
deployment.browser.path=C\:\\Program Files (x86)\\Internet Explorer\\iexplore.exe
#Java Deployment jre's
#Wed Aug 15 22:05:15 IDT 2012
deployment.javaws.jre.1.registered=true
deployment.javaws.jre.1.osname=Windows
deployment.javaws.jre.0.registered=true
deployment.javaws.jre.0.platform=1.7
deployment.javaws.jre.1.enabled=true
deployment.javaws.jre.1.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.osname=Windows
deployment.javaws.jre.0.path=C\:\\Program Files (x86)\\Java\\jre7\\bin\\javaw.exe
deployment.javaws.jre.0.product=1.7.0_05
deployment.javaws.jre.1.osarch=x86
deployment.javaws.jre.1.path=C\:\\Program Files (x86)\\Java\\jre6\\bin\\javaw.exe
deployment.javaws.jre.1.platform=1.6
deployment.javaws.jre.0.osarch=x86
deployment.javaws.jre.1.product=1.6.0_31
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.enabled=true
deployment.javaws.jre.0.args=

in the code above i have 2 versions of JRE installed and it is found in every user’s profile.
all i did was copy the file and appending it with these 2 parameters:

<pre>deployment.system.cachedir=C:\\Java_System_Cache
deployment.cache.enabled=True</pre>

Then I create the folder C:\Java_System_cache

The next steps are:
running javaws.exe which is the client for JNLP applets the way i want depending on what i need, if i need to profile an application for streaming i will do:
javaws -import -system <url to jnlp>
or
javaws -import -system -silent <url to jnlp>
both the above cache the jnlp to system cache i pre-configured earlier
i can then do javaws -system <url to jnlp> as the command line for the streamed application to launch the app from the cache,
there’s also -offline switch which might be handy in some situations.

When i profile the applet i will perform installation of the JRE i need so everything will be recorded, create and specify the java folders, properties files and config files, import the applet and save that for later virtualization.

if i wanted to do it on a workstation / XenApp without virtualizing i would just place the config / property files, configure the java cache locations, import the JNLP and set the published application command line to be in the lines of:

javaws -system <url to jnlp>

and that’s that!

wait, wait, wait, in the last part i mentioned it’s handy for upgrades of applets, yeah it is, if the vendor requires me to clear the cache i can do it for the SYSTEM cache using the parameters like:
javaws -uninstall <url to jnlp>
or
javaws -clearcache (to completely clear the cache)

Voila! hope this helps all you administrators out there who want to keep IT clean with those Java based applications.





Properly Streaming a Java or JNLP Application (Java client settings in enterprise environment) – part 2

16 08 2012

In a previous post i mentioned JNLP Applets and Application streaming,

Before I dive in to the step by step part of making streamed applications work better when they involve web start applets (JNLP) I first want to provide you with better understanding on how JNLP works because I feel that what I did with Citrix application can be applied to other environments that don’t necessarily feature application streaming like enterprise centralized access for JNLP applications, I also provide some best practice for the beginners and to those looking to consolidate or move those applet to SBC environment or even to just manage them.

Read the rest of this entry »