From: Frank Langelage on
On 27.12.09 14:03, zigzagdna wrote:
> I have jdk 5.0 and jdk 6.0 installed on my HP UNIX 11i. I see java
> has options: -d32 and
> -d64. But I do not see corresponding options in javac, why?
>
> If I want to run 64 bit java to take advantage of larger than 4GB
> heaps, do I need to compile my java code using some 64 bit option. It
> is naive question? Or any .jar files will start taking advantage of 64
> bit java, if I start my application using java -d64.
>
> THANKS A LOT,
>

The source code and byte code is independent of the pointer size or
memory size you wan't to use at runtime.
So no need for javac to have the size option.
You can use the same class (jar-) files for both models.

The native code of the JRE and the JDK have to be compiled and available
in 32- and 64-bit if you want to use both.
From: zigzagdna on
On Dec 27, 8:38 am, Frank Langelage <fr...(a)lafr.de> wrote:
> On 27.12.09 14:03, zigzagdna wrote:
>
> > I have jdk 5.0 and jdk 6.0 installed on my HP UNIX 11i.  I see java
> > has options: -d32 and
> > -d64. But I do not see corresponding options in javac, why?
>
> > If I want to run 64 bit java to take advantage of larger than 4GB
> > heaps, do I need to compile my java code using some 64 bit option. It
> > is naive question? Or any .jar files will start taking advantage of 64
> > bit java, if I start my application using java -d64.
>
> > THANKS A LOT,
>
> The source code and byte code is independent of the pointer size or
> memory size you wan't to use at runtime.
> So no need for javac to have the size option.
> You can use the same class (jar-) files for both models.
>
> The native code of the JRE and the JDK have to be compiled and available
> in 32- and 64-bit if you want to use both.

Question on WIndows Platform:
Let us I download jdk 1.6 for Windows X-64. Then my jvm is 64 bit. I
then have to specify java -d64 to use 64 bit memory capability. My
existing third party jar files, Apacake tomcat etc will automatically
start taking advantage of more memory. Do I have to set -Xmx option.
i.e.,
java -d64 -XmX 8024M so haeap emory can grow to 8GB.
From: Arne Vajhøj on
On 27-12-2009 10:34, zigzagdna wrote:
> On Dec 27, 8:38 am, Frank Langelage<fr...(a)lafr.de> wrote:
>> On 27.12.09 14:03, zigzagdna wrote:
>>> I have jdk 5.0 and jdk 6.0 installed on my HP UNIX 11i. I see java
>>> has options: -d32 and
>>> -d64. But I do not see corresponding options in javac, why?
>>
>>> If I want to run 64 bit java to take advantage of larger than 4GB
>>> heaps, do I need to compile my java code using some 64 bit option. It
>>> is naive question? Or any .jar files will start taking advantage of 64
>>> bit java, if I start my application using java -d64.
>>
>> The source code and byte code is independent of the pointer size or
>> memory size you wan't to use at runtime.
>> So no need for javac to have the size option.
>> You can use the same class (jar-) files for both models.
>>
>> The native code of the JRE and the JDK have to be compiled and available
>> in 32- and 64-bit if you want to use both.
>
> Question on WIndows Platform:
> Let us I download jdk 1.6 for Windows X-64. Then my jvm is 64 bit. I
> then have to specify java -d64 to use 64 bit memory capability.

Unless it is default.

> My
> existing third party jar files, Apacake tomcat etc will automatically
> start taking advantage of more memory.

Yes.

> Do I have to set -Xmx option.
> i.e.,
> java -d64 -XmX 8024M so haeap emory can grow to 8GB.

-Xmx8g may be needed if the default is below 8 GB (which it
most likely is).

Arne
From: zigzagdna on
On Dec 27, 11:25 am, Arne Vajhøj <a...(a)vajhoej.dk> wrote:
> On 27-12-2009 10:34, zigzagdna wrote:
>
>
>
>
>
> > On Dec 27, 8:38 am, Frank Langelage<fr...(a)lafr.de>  wrote:
> >> On 27.12.09 14:03, zigzagdna wrote:
> >>> I have jdk 5.0 and jdk 6.0 installed on my HP UNIX 11i.  I see java
> >>> has options: -d32 and
> >>> -d64. But I do not see corresponding options in javac, why?
>
> >>> If I want to run 64 bit java to take advantage of larger than 4GB
> >>> heaps, do I need to compile my java code using some 64 bit option. It
> >>> is naive question? Or any .jar files will start taking advantage of 64
> >>> bit java, if I start my application using java -d64.
>
> >> The source code and byte code is independent of the pointer size or
> >> memory size you wan't to use at runtime.
> >> So no need for javac to have the size option.
> >> You can use the same class (jar-) files for both models.
>
> >> The native code of the JRE and the JDK have to be compiled and available
> >> in 32- and 64-bit if you want to use both.
>
> > Question on WIndows Platform:
> > Let us I download jdk 1.6 for Windows X-64. Then my jvm is 64 bit. I
> > then have to specify java -d64 to use 64 bit memory capability.
>
> Unless it is default.
>
>  >                                                                  My
>
> > existing third party jar files, Apacake tomcat etc will automatically
> > start taking advantage of more memory.
>
> Yes.
>
> >                                        Do I have to set -Xmx option.
> > i.e.,
> > java -d64 -XmX 8024M so haeap emory can grow to 8GB.
>
> -Xmx8g may be needed if the default is below 8 GB (which it
> most likely is).
>
> Arne- Hide quoted text -
>
> - Show quoted tex
I am reading some literature on 64bit java. It says 64 bit jvm could
be slower than 32 jvm because all paths are larger (pointers etc). So
if application java code is not taking advantage of 64 bit
architecture, things could be slower.

My question is:
If I just install java 32 bit jvm (JDK 1.6 for Windows) on 64 bit os,
will it let me take advantage of additional memory (up to 4GB instead
of 8GB)? Do I need to make java.exe /LARGEADDRESSAWARE flag set or
32bit java.exe by itself can access up to 4GB memory, I am on 64 bit
Windows OS.



From: Lew on
zigzagdna wrote:
>> I have jdk 5.0 and jdk 6.0 installed on my HP UNIX 11i. I see java
>> has options: -d32 and
>> -d64. But I do not see corresponding options in javac, why?
....
>> Question on WIndows Platform:
>> Let us I download jdk 1.6 for Windows X-64. Then my jvm is 64 bit. I
>> then have to specify java -d64 to use 64 bit memory capability.

Arne Vajhøj wrote:
> Unless it is default.

zigzagdna wrote:
>> existing third party jar files, Apacake tomcat etc will automatically
>> start taking advantage of more memory.

Arne Vajhøj wrote:
> Yes.

zigzagdna wrote:
>> Do I have to set -Xmx option. i.e.,
>> java -d64 -XmX 8024M so haeap emory can grow to 8GB.

Arne Vajhøj wrote:
> -Xmx8g may be needed if the default is below 8 GB (which it
> most likely is).
<http://java.sun.com/javase/6/docs/technotes/guides/vm/gc-ergonomics.html>

<http://java.sun.com/javase/6/docs/technotes/tools/index.html#basic>
<http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html>
<http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html>

From the command line:
java -?

--
Lew