• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is sun's JVM 64 bit?

 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been using 32 bit OS and have been using Sun's JVM.

I recently setup a system with 64 bit linux (Ubuntu 9.04) and didn't think to check specifically for a 64 bit JVM

java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode)


Does this indicate whether it is 32 or 64 bit?

Thanks
pat
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which one did you download?
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:Which one did you download?


well, it said X86/something 64

But the download file name is not supposed to be important. One recent one I've tried is
jdk-6u14-nb-6_5_1-linux-ml.sh

The java.sun.com site is unclear as to what it is. They have specifics on 64 bit SDK/JVM but only talk about Solaris and the commercial Linux distros (red hat, Suse, etc.)

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you download a JDK it asks you which one you want. Not sure why you believe the filename is insignificant.

I don't know if it shows up in the -version blurb or not--I thought it did, but I don't have a 64-bit version handy to check. (I take that back; it reports correctly as 64-bit on my OS X machine.)

This might also help: http://forums.java.net/jive/message.jspa?messageID=274406
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:. (I take that back; it reports correctly as 64-bit on my OS X machine.)


how does it indicate correct 64-bit ness?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It says "64 bit" somewhere in the VM description.

You didn't download the 64-bit version, based on your filename. AFAIK the NB bundle is the 32-bit version, which your -version info seems to indicate.

The appended link allows you to choose which bitness you want:

https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u16-oth-JPR@CDS-CDS_Developer
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15356
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are running Ubuntu, and you install Sun Java from the Ubuntu repository instead of installing it manually (by downloading it directly from Sun):

sudo apt-get install sun-java6-jdk

Then you'll get the 64-bit version of Sun Java if your Ubuntu is also 64-bit.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper Young wrote:If you are running Ubuntu, and you install Sun Java from the Ubuntu repository instead of installing it manually (by downloading it directly from Sun):
sudo apt-get install sun-java6-jdk
Then you'll get the 64-bit version of Sun Java if your Ubuntu is also 64-bit.


That's nice to know, as finding the right one on the java.sun.com site is a pain.
I don't see a parallel for the JEE JDK/libaries, perhaps they are size agnostic?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15356
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there are Ubuntu packages for Java EE, but as far as I know Glassfish (Sun's Java EE reference implementation) is pure Java anyway, so there shouldn't be separate 32-bit and 64-bit versions.
 
Salman Ahmed
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more way to check if you're installed JVM is 64-bit is to see if the "java" executable accepts the "-d64" option to specify the 64-bit data model.
If your JVM is 64-bit capable, it will accept either the "-d32" or the "-d64" option to select either the 32-bit or 64-bit data model respectively.

(Sample output taken from a 64-bit Debian install)
ssahmed@debian:[~]$ uname -a
Linux debian 2.6.26-2-amd64 #1 SMP Mon Oct 19 02:34:17 UTC 2009 x86_64 GNU/Linux
ssahmed@debian:[~]$ java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-d32 use a 32-bit data model if available

-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
<rest of output snipped>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic