• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Do java classes need to be recompiled for 64 bit O/S

 
Ranch Hand
Posts: 144
Redhat Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We usaually see that we have a seperate Software for 32 bit and 64 bit O/S
Also people say that 64 bit machines can run most of 32 bit software albeit performance increase is not guaranteed.


My search into hte ranch gave me one nugget that is
----------
"By default jvm runs in 32 bit mode. I think you have to pass an argument
( -d64 ) into the JVM to make it run in 64 bit mode. " (Thanks Rich)
-----

My question is if we need to recompile our java classes and jar files (and regenerating this byte code) to get them to work efficiently. Or it is not required as it is the jvm which is handling the execution.

thanks for inputs.
Sunil
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope, you don't need to recompile. 64-bits doesn't mean the code runs more efficiently, it has to do with the maximum amount of memory that can be allocated by a program, and this is completely controlled by the JVM.

The compiled code isn't compiled for a specific machine or processor, the JVM will take the java compiled code and interpret it properly into real machine code whether the system is 32 bit or 64 bit. Although, for a program to actually require 64-bit addressing it would have to have access and use more than 4 GBs of space, which is very unlikely unless you are running a server.
[ November 16, 2005: Message edited by: Scott Selikoff ]
 
sunil choudhary
Ranch Hand
Posts: 144
Redhat Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks scott for the reply,

Can I say that ..
Class file will be able to leverage ALL the benefits of 64 bit architecture without being recompiled in a 64 bit env.


Actually I am talking about server Exactly speakling we are moving our Oracle 11i E Business Suite from 32 bit SOlaris to 64 bit.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Java code will take advantage of the 64 bit architecture if you've got a 64-bit JVM running in 64-bit mode.

Note that Sun's 32-bit JVMs actually have a Java heap limit of about 1855 MB, so anything above that (a limit I've bumped into a number of times in scientific computing applications) and you will benefit from a 64-bit heap.
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Among other things, I support a single Java application (no recompiling) for many architectures, including a few 64-bit architectures. Therefore, there is no need to recompile (in fact, it is impossible since it is ill-defined).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic