-1

I have been in a programming class for a semester of school and we have been developing a game now for a while. we recently finished and i wanted to play it with my friend. The issue my friend and i had is that the game was programmed for java 32 bit and we both use java 64 bit. I understand a reasonable solution would be to install java 32 bit but having this messes up a mod manager my friend is using. I would like to know if there is any way to convert a 32 bit java program to 64 bit. I've searched for hours now and have found nothing. Please tell me is there is a way to convert the program instead of recoding the entire game.

nodrog
  • 1
  • 1
  • 1
    There's no such thing as "32-bit" or "64-bit" Java programs. Perhaps you simply need a different JRE? – chrylis -cautiouslyoptimistic- Dec 15 '14 at 23:14
  • Since you have the source code, can't you just recompile it on the 64-bit machine? – IMSoP Dec 15 '14 at 23:14
  • Take the compiled code, run it under a 64bit jvm. It's now a 64bit program – MadProgrammer Dec 15 '14 at 23:16
  • @IMSoP That question is meaningless for a language like Java that targets a machine-independent bytecode. – chrylis -cautiouslyoptimistic- Dec 15 '14 at 23:18
  • 2
    what went wrong for you when you tried to run your program with your 64 bit JVM? – Dawood ibn Kareem Dec 15 '14 at 23:21
  • @chrylis Fair enough; I thought it was not impossible that the JVM itself used 64-bit memory addresses on a 64-bit OS, and would thus need a different compiled form, but thinking about it it does seem unlikely, since each instance is unlikely to be allocated enough RAM by the OS for such addresses to be useful. – IMSoP Dec 15 '14 at 23:23
  • @IMSoP A 64-bit JVM will use 64-bit memory addresses. The Java bytecode is completely agnostic about the word size of the execution platform. – chrylis -cautiouslyoptimistic- Dec 15 '14 at 23:24
  • 1
    @chrylis I was assuming that the bytecode itself would include some numeric memory offsets, but I suppose only within the size of the program itself. Anyhow, I'm not arguing that it does have a 64-bit form, just justifying my own naivety. The more important thing is to find out what the OP's actual problem was on the JRE they tried. – IMSoP Dec 15 '14 at 23:29

1 Answers1

2

Simply, there is not such conversion. Java programs can run on 32bit or 64bit JVMs without any change. The JVM takes care of all the low level implementation details for making your application run transparently.

Nicola Ferraro
  • 4,051
  • 5
  • 28
  • 60