You might get a request to to publish an Internet Explorer URL/link in XenApp for whatever reason. Web applications that use Java Runtime Environment (JRE)/Java applets do not play nicely with Citrix XenApp. The main problem is the Java cache. It wants to write its cache to:
C:\Program Files\Java\Cache\username\Sun\Java\Deployment\cache
by default during a XenApp session but nothing ever gets populated past the “username” part. The directory underneath will be blank and your web application will never load the Java applet.
I’m not a Java expert and I’m not even going to claim the following is any kind of best practice. But this is what I have done in my environments to make the web apps work using XenApp. If you have a better way of doing it, please do comment in this post.
So a little background, I am using Windows Server 2008 R2 with IE9 with Java (JRE) 6 Update 26 installed because my web app requires that specific version of Java.
1. Go to “C:\WINDOWS\Sun\Java\Deployment
” and create a file called “deployment.config
” with the following:
deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
2. Now create a file called “deployment.properties
” in the same folder with your custom properties. What I do is generate a deployment file and then copy it over to this directory. To do this, open up Internet Explorer and go to your web app. Once Java is invoked, you will notice the Java icon in the notification bar in the bottom right.
Right click on it > Open Control Panel > Settings and you will see a path where temporary files are kept.
This is the default Java cache and will look like:
C:\Users\username\AppData\LocalLow\Sun\Java\Deployment\cache
Navigate to:
C:\Users\username\AppData\LocalLow\Sun\Java\Deployment\
and there will be a file called “deployment.properties
” that was just generated for you. Just copy it over to the “C:\WINDOWS\Sun\Java\Deployment
” folder as is.
Now you need to edit this file and specify the Java cache to be somewhere else. In my case, I want it to go to a folder on my D: drive called JavaCache. So all I add is this line (make sure the slashes are just like this, I know it’s a little odd):
deployment.user.cachedir=D\:\\JavaCache
So now my “deployment.properties
” file will look like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#deployment.properties #Mon Nov 28 13:17:40 CST 2011 deployment.javaws.cache.update=true deployment.version=6.0 deployment.user.cachedir=D\:\\JavaCache deployment.capture.mime.types=true deployment.javapi.cache.update=true deployment.browser.path=C\:\\Program Files (x86)\\Internet Explorer\\iexplore.exe #Java Web Start jre's #Mon Nov 28 13:17:40 CST 2011 deployment.javaws.jre.0.registered=true deployment.javaws.jre.0.platform=1.6 deployment.javaws.jre.0.osname=Windows deployment.javaws.jre.0.path=C\:\\Program Files (x86)\\Java\\jre6\\bin\\javaw.exe deployment.javaws.jre.0.product=1.6.0_26 deployment.javaws.jre.0.osarch=x86 deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se deployment.javaws.jre.0.enabled=true deployment.javaws.jre.0.args= |
Yours will probably look different than mine depending on which version of JRE you have installed.
3. Make sure to create the location you specified above. It can be a blank folder and will be populated the first time someone invokes Java. So in my case, I created:
D:\JavaCache
4. Now publish IE and the URL like you normally would in the XenApp console. IMPORTANT NOTE: If you are using 32 bit IE and installed 32 bit Java, DO NOT publish 64 bit IE by accident. It will not be able to use the 32 bit Java. You will need to install 64 bit Java if you intend to use 64 bit IE.
Here is an example of how 32 bit IE should be published on Server 2008 R2 in XenApp 6.5:
Command line:
"C:\Program Files (x86)\Internet Explorer\iexplore.exe" "http://www.google.com"
Working directory:
C:\Program Files (x86)\Internet Explorer
5. That’s it, now launch your published IE web app from your desktop via the WI and it should load just fine. Once Java is invoked, verify your Java cache is pointed at the new location. Just look in your notification area for the Java icon, right click on it > Open Control Panel > Settings and you should see “D:\JavaCache
“.
One interesting thing to note, older versions of Java pull their deployment configuration from a different location. So if putting everything in:
C:\WINDOWS\Sun\Java\Deployment
does not work for you, try copying them to:
C:\Program Files (x86)\Java\jre6\lib
and everything should work. Just make sure to edit your “deployment.config
” accordingly with the new path to “deployment.properties
“. An example, I have a web app that requires JRE 6 Update 11 and it pulls the deployment info from the lib folder and completely ignores the one in the Windows folder:
I also want to note that Oracle has pretty good documentation on configuring the deployment configuration file to your liking here:
http://docs.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/properties.html
You can do quite a bit of customization to it. Some of my web apps require certain things to be configured in Java such as suppressing certain warning messages and I have used this article to set those switches. For example setting the Java System Cache:
deployment.system.cachedir=D\:\\JavaSystemCache
or Trusted Certs store:
deployment.user.security.trusted.certs=D\:\\JavaCertStore\\security\\trusted.certs
deployment.system.security.trusted.certs=D\:\\JavaCertStore\\security\\trusted.certs
or getting rid of Java warning prompts:
deployment.security.notinca.warning=false
deployment.security.expired.warning=false
deployment.security.mixcode=HIDE_RUN
or even setting Java heap size memory limits:
deployment.javaws.jre.0.args=-Xmx256m -Xms64m
deployment.javapi.jre.0.args=-Xmx256m -Xms64m
where 0 should be the Java version, but it has worked for me without having to specify it in the past. If you do want to put the version it should be like this:
deployment.javaws.jre.1.6.0.args=-Xmx256m -Xms64m
deployment.javapi.jre.1.6.0.args=-Xmx256m -Xms64m
Again, I’m not a Java expert so there may be an easier way of doing this but this is how I have been able to get my Java web apps to work with XenApp. Let me know of your experiences.
Jason Samuel is a visionary product leader and trusted advisor with a proven track record of shaping strategy and driving technology innovation. With extensive expertise in enterprise end-user computing, security, cloud, automation, and virtualization technologies, Jason has become a globally recognized authority in the IT industry. His career spans consulting for hundreds of Fortune 500 enterprises across diverse business sectors worldwide, delivering cutting-edge digital solutions from Citrix, Microsoft, VMware, Amazon, Google, and NVIDIA that seamlessly balance security with exceptional user experiences.
Jason’s leadership is amplified by his dedication to knowledge-sharing as an author, speaker, podcaster, and mentor within the global IT and technology community. Recognized with numerous prestigious awards, Jason’s contributions underscore his commitment to advancing technology and empowering organizations to achieve transformative results. Follow him on LinkedIn.
Kiran@Maven command tutorials
January 22, 2012 at 6:27 PM
Appreciate your work with detailed information. I am looking for java on citrix app
Keep rocking
Sebastian
January 26, 2012 at 11:44 AM
Thank you so much. You saved my day 🙂
Jim
February 3, 2012 at 4:52 PM
You came through when our Java web app developer couldn’t. they just dont know the caveats within citrix. That said! GREAT WRITE UP!
Eric
February 6, 2012 at 10:28 AM
Does this set the cache location for all users or do you have to do them each individually?
Jason Samuel
February 6, 2012 at 10:34 AM
@Eric
Sets it for all users.
bob
April 9, 2012 at 1:14 PM
This also worked for me but I found a much easier solution that also worked in my environment. Not sure if it applies to everyone.
My initial Java install was done with a Domain Admin account. Win2k8 r2 does some incorrect registry action when this is done from that account.
I uninstalled, logged in as a Domain User/Local Administrator and installed with that account. Solved all our issues.
Technology Forum
July 18, 2012 at 2:09 AM
Thanks for providing each step in detail. Actually i installed citrix plugins, somehow its not working. After reading this i am able to fix the problem.
Unix and linux forum
Biren Shah
November 7, 2012 at 8:59 AM
You Rock! Thank you for making this document available.
Nicolas
November 8, 2013 at 7:56 AM
Thank you !
My contribution :
Instead of storing the datas (cache, certs) into the D: disk, you may store them into your TS User folder.
On the AD user configuration, you have mapped this folder with a driver (L: for exemple).
Thus, your certs will be saved once.
Blair Ensinger
August 6, 2014 at 8:40 AM
Great tips for this issue. Also, I found that even if you do not have “Keep temporary files on my computer” check ON, this workaround is still required because the JRE caches some runtime data that it does not advertise.
Salvatore
August 13, 2014 at 9:49 PM
Jason, I hope you can shed some light on this.
We get a blank page when running a web application using applets. (Oracle*Forms 11g)
But it works fine if the client is on the same network domain as the Citrix server.
The two client are on the same PC even.
Any ideas?
vineet tripathi
September 7, 2014 at 6:20 AM
have tried to configure above settings but Run Time Parameter is only reflecting under system tab not for user TAB. I am trying this to setup in xenapp6.5. can any one help on this.
pratibha
May 5, 2015 at 12:10 AM
Really very nice information.
However doing so still could not launch my applet application on windows server 2008 which is working fine in windows 7.
Prasanth
June 2, 2015 at 9:13 PM
Thanks much for the information posed.
I have a question. (might be a silly one 🙂 ) but need your comments.
Can we use the same cache used for all the users? please reply..
Tiphanie
December 9, 2015 at 5:57 PM
Salvatore…were you able to find a solution…we are seeing the same issue.
Veday Jain
November 13, 2016 at 9:25 PM
Hi. I am experiencing same issue addressed with Java 7 Update 65. However above recipe doesn’t work for me. I also uninstall and reinstall Java using Local Administrator account but no avail. Is anyone can suggest any other way? Also, I like to ask same question again as raised by Prasanth earlier -“Can we use the same cache used for all the users? please reply”
Thanks
Veday
ajac
October 22, 2018 at 9:29 AM
Hi … we have a graphics intensive Java application published via Citrix (using Citrix Receiver 4.3 to access). End users are reporting issues like:
1) Y-axis on a plot not displaying
2) application does not respond after remaining inactive for a period of time
3) unable to select from context menu
Wondering if this is actually a Citrix issue? Any inputs on how to go about solving?
Yogesh
May 8, 2019 at 2:39 PM
Hello, how to conf different java versions on xenapp server for different application
balamurali chemirthi
December 22, 2019 at 1:04 AM
HiSamuel,
Good day!
I am unable to find the mentioned path “C:\WINDOWS\Sun\Java\Deployment” in win2012R2.
Kindly let me know if it has to be created manually.
Thank you.
Balamurali Chemirthi