[SLE] how to switch to IBM JRE
Hello. Using SuSE 10.1 in zh_CN.UTF-8 locale, frequently a java application suddenly stop responding to keyboard events (only responds to mouse). a.k.a typing anything in java applications is like not typied anything at all. This affects all java applications and even openoffice (the one installed using OOO official RPM). I am pretty sure this only affects Chinese user because I can easily observe this bug on many SuSE computers and even on Gentoo Linux, but this bug cannot survive so long if western people suffer from it too:) I decide to switch to IBM JRE which do not suffer from this problem. After installed it (from Official IBM JRE site) I can use it by setting JAVA_HOME manually, but I cannot make this setting system-wide. This is what I tried after reading various documents: 1. I tried to add 'export JAVA_HOME=/opt/ibm/java2-i386-50/jre/' in /etc/profile. Result: $JAVA_HOME is still "/usr/lib/jvm/java" 2. I tried to add 'JAVA_HOME=/opt/ibm/java2-i386-50/jre' to /etc/java/java.conf. Result: $JAVA_HOME is still "/usr/lib/jvm/java" 3. I tried "update-alternatives --config java" and was told "There is only 1 program which provides java (/usr/lib/jvm/jre-1.5.0-sun/bin/java). Nothing to configure." 4. I tried to use setDefaultJava and setJave, both produce the following error message: ################################################################ # setDefaultJava is no longer supported. Please install the # # package jpackage-utils and read the documentation in # # /usr/share/doc/packages/jpackage-utils for information about # # the new java packages on SUSE Linux. # ################################################################ Please give me some hints or let me know which document to read if I wish to change the global-settings of default JRE. Thank you! -- 锐业软服(国内业务) http://www.realss.cn Real SoftService http://www.realss.com 销售咨询(Sales Department): 0086 592 20 99987 (Chinese, German, English) 国际业务(International Sales): 0086 10 8460 6011 (German and English) 联系:厦门大学科技园,嘉庚二号楼6楼 邮政:厦门大学2312号信箱(邮编361005)
Hi 张韡武:, take a look into /etc/java. Inside that directory you can find a java.conf and a README file. Best Regards, Peter Am Freitag, 14. Juli 2006 08:58 schrieb 张韡武:
Hello. Using SuSE 10.1 in zh_CN.UTF-8 locale, frequently a java application suddenly stop responding to keyboard events (only responds to mouse). a.k.a typing anything in java applications is like not typied anything at all. This affects all java applications and even openoffice (the one installed using OOO official RPM). I am pretty sure this only affects Chinese user because I can easily observe this bug on many SuSE computers and even on Gentoo Linux, but this bug cannot survive so long if western people suffer from it too:)
I decide to switch to IBM JRE which do not suffer from this problem. After installed it (from Official IBM JRE site) I can use it by setting JAVA_HOME manually, but I cannot make this setting system-wide. This is what I tried after reading various documents: 1. I tried to add 'export JAVA_HOME=/opt/ibm/java2-i386-50/jre/' in /etc/profile. Result: $JAVA_HOME is still "/usr/lib/jvm/java" 2. I tried to add 'JAVA_HOME=/opt/ibm/java2-i386-50/jre' to /etc/java/java.conf. Result: $JAVA_HOME is still "/usr/lib/jvm/java" 3. I tried "update-alternatives --config java" and was told "There is only 1 program which provides java (/usr/lib/jvm/jre-1.5.0-sun/bin/java). Nothing to configure." 4. I tried to use setDefaultJava and setJave, both produce the following error message: ################################################################ # setDefaultJava is no longer supported. Please install the # # package jpackage-utils and read the documentation in # # /usr/share/doc/packages/jpackage-utils for information about # # the new java packages on SUSE Linux. # ################################################################
Please give me some hints or let me know which document to read if I wish to change the global-settings of default JRE. Thank you!
-
在 2006-07-14五的 10:13 +0200,Peter Trebing写道:
Hi 张韡武:,
take a look into /etc/java. Inside that directory you can find a java.conf and a README file.
This is exactly what I did, read below:
2. I tried to add 'JAVA_HOME=/opt/ibm/java2-i386-50/jre' to /etc/java/java.conf. Result: $JAVA_HOME is still "/usr/lib/jvm/java"
I did the above because I read /etc/java/README ... I also tried to logout and login back to check if $HOME_JAVA is changed. no, it's not changed at all. I also think perhaps /etcjava/README is a bit outdated because it suggested me to use setJava which is no longer supported.
On 7/14/06, ���|��
�� 2006-07-14��� 10:13 +0200��Peter Trebing���
Hi ���|��:,
take a look into /etc/java. Inside that directory you can find a java.conf and a README file.
This is exactly what I did, read below:
2. I tried to add 'JAVA_HOME=/opt/ibm/java2-i386-50/jre' to /etc/java/java.conf. Result: $JAVA_HOME is still "/usr/lib/jvm/java"
Try adding export JAVA_HOME=/opt/ibm/java2-i386-50/jre to /etc/profile
在 2006-07-14五的 15:04 +0530,Jigish Gohil写道:
Try adding export JAVA_HOME=/opt/ibm/java2-i386-50/jre to /etc/profile
This is exactly what I did, read below:
1. I tried to add 'export JAVA_HOME=/opt/ibm/java2-i386-50/jre/' in /etc/profile. Result: $JAVA_HOME is still "/usr/lib/jvm/java"
I did the above because I read man sh(1) ... Besides, have you ever tried it and is it working for you? -- 锐业软服(国内业务) http://www.realss.cn Real SoftService http://www.realss.com 销售咨询(Sales Department): 0086 592 20 99987 (Chinese, German, English) 国际业务(International Sales): 0086 10 8460 6011 (German and English) 联系:厦门大学科技园,嘉庚二号楼6楼 邮政:厦门大学2312号信箱(邮编361005)
I did the above because I read man sh(1) ...
Besides, have you ever tried it and is it working for you?
Sorry, a bit hasty reply there. grep "JAVA_HOME" /etc/* -R to find out if its set somewhere else too. JAVA_HOME is set somewhere else too which executes after /etc/profile and is overriding it. Try putting export line in ~/.profile too. -J -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Friday 14 July 2006 08:58, 张韡武 wrote:
1. I tried to add 'export JAVA_HOME=/opt/ibm/java2-i386-50/jre/' in /etc/profile. Result: $JAVA_HOME is still "/usr/lib/jvm/java"
If this happens, then JAVA_HOME is possibly ALSO set in your ~/.profile or ~/.bashrc. Try looking in one of those files. i hope this helps... -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
On 14/07/06 04:24, stephan beal wrote:
On Friday 14 July 2006 08:58, 张韡武 wrote:
1. I tried to add 'export JAVA_HOME=/opt/ibm/java2-i386-50/jre/' in /etc/profile. Result: $JAVA_HOME is still "/usr/lib/jvm/java"
If this happens, then JAVA_HOME is possibly ALSO set in your ~/.profile or ~/.bashrc. Try looking in one of those files.
i hope this helps...
I think these are getting set in one of the scripts in /etc/profile.d, eg. /etc/profile.d/alljava.sh -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
在 2006-07-14五的 14:11 -0600,Darryl Gregorash写道:
On 14/07/06 04:24, stephan beal wrote:
On Friday 14 July 2006 08:58, 张韡武 wrote:
1. I tried to add 'export JAVA_HOME=/opt/ibm/java2-i386-50/jre/' in /etc/profile. Result: $JAVA_HOME is still "/usr/lib/jvm/java"
If this happens, then JAVA_HOME is possibly ALSO set in your ~/.profile or ~/.bashrc. Try looking in one of those files.
i hope this helps...
I think these are getting set in one of the scripts in /etc/profile.d, eg. /etc/profile.d/alljava.sh
Thank you! after followed your advice read /etc/profile.d/alljava.sh I come up with a trick to change to IBM JRE easier. I know this is not the 'correct' way but it works for me without having to touch the config files. # mkdir /usr/lib64 # ln -s /opt/ibm/java2-i386-50/ /usr/lib64/jvm This trick used the feature that alljava.* scripts always think if the system has 64-bit jvm it should be used in place of traditional /usr/lib/jvm I never worry abut it because the box is not 64-bit processor -- 锐业软服(国内业务) http://www.realss.cn Real SoftService http://www.realss.com 销售咨询(Sales Department): 0086 592 20 99987 (Chinese, German, English) 国际业务(International Sales): 0086 10 8460 6011 (German and English) 联系:厦门大学科技园,嘉庚二号楼6楼 邮政:厦门大学2312号信箱(邮编361005)
participants (5)
-
Darryl Gregorash
-
Jigish Gohil
-
Peter Trebing
-
stephan beal
-
张韡武