Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #15092 > unrolled thread
| Started by | zyng <xsli2@yahoo.com> |
|---|---|
| First post | 2012-06-07 11:46 -0700 |
| Last post | 2012-06-07 18:31 -0700 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.java.programmer
How to use 32 bits JRE on Windows 7 64 bits computer? zyng <xsli2@yahoo.com> - 2012-06-07 11:46 -0700
Re: How to use 32 bits JRE on Windows 7 64 bits computer? Robert Klemme <shortcutter@googlemail.com> - 2012-06-07 21:49 +0200
Re: How to use 32 bits JRE on Windows 7 64 bits computer? zyng <xsli2@yahoo.com> - 2012-06-07 17:40 -0700
Re: How to use 32 bits JRE on Windows 7 64 bits computer? Robert Klemme <shortcutter@googlemail.com> - 2012-06-08 04:04 -0700
Re: How to use 32 bits JRE on Windows 7 64 bits computer? Roedy Green <see_website@mindprod.com.invalid> - 2012-06-07 18:31 -0700
Re: How to use 32 bits JRE on Windows 7 64 bits computer? Roedy Green <see_website@mindprod.com.invalid> - 2012-06-07 18:31 -0700
| From | zyng <xsli2@yahoo.com> |
|---|---|
| Date | 2012-06-07 11:46 -0700 |
| Subject | How to use 32 bits JRE on Windows 7 64 bits computer? |
| Message-ID | <018d458b-c915-4b2d-8397-65b297e649a2@googlegroups.com> |
Both 32 bits and 64 bits JRE are installed on Windows 7 64 bits computer. Normally, 64 bits JRE is used. Right now, for some reason, we hope that 32 bits JRE is used when running a commercial Java program. Is this only the matter of setting the environment variable JAVA_HOME? We have tried that and it didn't show the effect we expected. Thank you.
[toc] | [next] | [standalone]
| From | Robert Klemme <shortcutter@googlemail.com> |
|---|---|
| Date | 2012-06-07 21:49 +0200 |
| Message-ID | <a3ceurFv4lU1@mid.individual.net> |
| In reply to | #15092 |
On 07.06.2012 20:46, zyng wrote: > Both 32 bits and 64 bits JRE are installed on Windows 7 64 bits > computer. Normally, 64 bits JRE is used. > > Right now, for some reason, we hope that 32 bits JRE is used when What do you mean by "we hope"? Do you /want/ the 32 bit JRE to be used? Or are you /assuming/ it is used? > running a commercial Java program. Is this only the matter of setting > the environment variable JAVA_HOME? We have tried that and it didn't > show the effect we expected. That depends entirely how the "commercial Java program" uses the JVM. Could be a script, an executable etc. and we have no way of knowing how it determines the JVM to use. Please provide more detail, especially what you expected and maybe also what "commercial Java program" we are talking about. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
[toc] | [prev] | [next] | [standalone]
| From | zyng <xsli2@yahoo.com> |
|---|---|
| Date | 2012-06-07 17:40 -0700 |
| Message-ID | <d1af7fc8-86dc-46fc-a73b-e03a0f24c543@googlegroups.com> |
| In reply to | #15093 |
Thank you for your reply. The issue has been solved. Just another question, on Microsoft Windows computer, I have installed JDK and have set the environment variable JAVA_HOME: (in Cygwin) $ echo $JAVA_HOME C:\Program Files\Java\jdk1.6.0_32 However, it seems "java" command is not from the JDK I installed, it is from c/Windows/system32/java. Why is that? $ java -version java version "1.6.0_31" Java(TM) SE Runtime Environment (build 1.6.0_31-b05) Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing) $ which java /cygdrive/c/Windows/system32/java So, on my computer, I have two "java" commands. Is this one(c/Windows/system32/java) a gift from Microsoft? I am puzzled. Thank you very much.
[toc] | [prev] | [next] | [standalone]
| From | Robert Klemme <shortcutter@googlemail.com> |
|---|---|
| Date | 2012-06-08 04:04 -0700 |
| Message-ID | <9145e02c-5a5e-45b9-8f2e-008d68ee31d5@googlegroups.com> |
| In reply to | #15094 |
On Friday, June 8, 2012 2:40:39 AM UTC+2, zyng wrote: > Thank you for your reply. The issue has been solved. > > Just another question, on Microsoft Windows computer, I have installed JDK and have set the environment variable JAVA_HOME: > > (in Cygwin) > $ echo $JAVA_HOME > C:\Program Files\Java\jdk1.6.0_32 > > However, it seems "java" command is not from the JDK I installed, it is from c/Windows/system32/java. Why is that? Because the shell does not use JAVA_HOME but PATH for lookup of executables. > $ java -version > java version "1.6.0_31" > Java(TM) SE Runtime Environment (build 1.6.0_31-b05) > Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing) > > $ which java > /cygdrive/c/Windows/system32/java > > So, on my computer, I have two "java" commands. Is this one(c/Windows/system32/java) a gift from Microsoft? Might be. Might also be that one Java installation put their executable there. Bottom line, you better make sure the proper executables from an installation directory are used. I typically have scripts which will honor JAVA_HOME and pick the proper executables so I can easily switch Java versions. Kind regards robert
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2012-06-07 18:31 -0700 |
| Message-ID | <7el2t79rbtbmtk53sd1ji41fqqo630n2v4@4ax.com> |
| In reply to | #15092 |
On Thu, 7 Jun 2012 11:46:11 -0700 (PDT), zyng <xsli2@yahoo.com> wrote, quoted or indirectly quoted someone who said : >Right now, for some reason, we hope that 32 bits JRE is used when running a commercial Java program. > Is this only the matter of setting the environment variable JAVA_HOME? We have tried that and it didn't show the effect we expected. Astoundingly, the browsers find and load the appropriate JVM automagically. Chrome needs a little help, but basically it is automatic. See http://mindprod.com/jgloss/googlechrome.html You can verify this by running http://mindprod.com/applet/wassup.html Try out IE 64 bit, and Firefox 32 bit or any of the other browsers at http://mindprod.com/jgloss/browser.html look for os.arch = amd64 vs x86 for 64 bit vs 32 bit or references to Program Files vs Program Files (x86). This applies to windows. -- Roedy Green Canadian Mind Products http://mindprod.com Controlling complexity is the essence of computer programming. ~ Brian W. Kernighan 1942-01-01 .
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2012-06-07 18:31 -0700 |
| Message-ID | <qel2t7laf2ecg00ev9b6ii02ekmg42e2oq@4ax.com> |
| In reply to | #15092 |
On Thu, 7 Jun 2012 11:46:11 -0700 (PDT), zyng <xsli2@yahoo.com> wrote, quoted or indirectly quoted someone who said : >Both 32 bits and 64 bits JRE are installed on Windows 7 64 bits computer. Normally, 64 bits JRE is used. > >Right now, for some reason, we hope that 32 bits JRE is used when running a commercial Java program. > Is this only the matter of setting the environment variable JAVA_HOME? We have tried that and it didn't show the effect we expected. Astoundingly, your browser selects the appropriate 32 or 64 bit JVM automagically. You can verify this by running http://mindprod.com/applet/wassup.html Which is used for an app depends which is first on the path. You can also put it on the pseudo path in the registry for Windows. http://mindprod.com/jgloss/registry.html#AUXPATH It is easiest to just specify fully if you flip often e.g. E:\Program Files\Java\jdk1.7.0_04\bin\java.exe or put it into a central global SET variable. es.g. set JAVA=E:\Program Files\Java\jdk1.7.0_04\bin\java.exe %java% -ea someparm -- Roedy Green Canadian Mind Products http://mindprod.com Controlling complexity is the essence of computer programming. ~ Brian W. Kernighan 1942-01-01 .
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web