Java 64 bit compilation combined with 32 bit compilation.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Java 64 bit compilation combined with 32 bit compilation.

Zachary1234-2
-If I program, compile and execute a 64 bit java program, calling on a .jar file library that contains 32 bit precompiled .class files, will my 64 bit program run seamlessly, in full 64 bit mode?

-What does the 64 bit java runtime do when it invokes 32 bit compiled code to run?  Does it impose 64 bit variable allocation when it encounters the equivalent 32 bit instruction?




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Java 64 bit compilation combined with 32 bit compilation.

tkellerer

Zachary1234 wrote:
> -If I program, compile and execute a 64 bit java program, calling on a .jar file library that contains 32 bit precompiled .class files, will my 64 bit program run seamlessly, in full 64 bit mode?
>
> -What does the 64 bit java runtime do when it invokes 32 bit compiled code to run?  Does it impose 64 bit variable allocation when it encounters the equivalent 32 bit instruction?


Note that plain Java questions are off-topic here. This forum/mailing list is about the usage of the NetBeans IDE, not general programming questions.

However:

There is no such thing as a "64 bit Java program".

The .class files that are generated are the same for 32 or 64 bit. There is no "32 bit compiled code" in Java.

The only difference is the JVM which is used to run those class files. The biggest difference between running on a 32bit JVM and a 64bit JVM is the maximum available memory that you can configure (and that is accepted by the "java" launcher).




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java 64 bit compilation combined with 32 bit compilation.

Papa
A conundrum, ain't it?

AFAIU, Java converts to byte code and the JRE to machine language, why
would even be questions like this one. In C++ we have to deal with that
'cos C++ compiles to machine language, I mean, to 'this' machine
language. The reason I am attracted to Java, is because I don't have to
worry about issues like, is this machine 32 bit and the other 64, or, is
this DLL compatible with my machine. Java's programs run in a virtual
environment, therefore,  these and other problems are Java's problems.

I'd really like to know the answer to Zachary1234 questions, but if
someone can clear up my understanding of Java before hand, that'll be
nice too.


On 12-Apr-2017 2:08 AM, tkellerer wrote:

> Zachary1234 wrote:
>> -If I program, compile and execute a 64 bit java program, calling on a .jar file library that contains 32 bit precompiled .class files, will my 64 bit program run seamlessly, in full 64 bit mode?
>>
>> -What does the 64 bit java runtime do when it invokes 32 bit compiled code to run?  Does it impose 64 bit variable allocation when it encounters the equivalent 32 bit instruction?
>
> Note that plain Java questions are off-topic here. This forum/mailing list is about the usage of the NetBeans IDE, not general programming questions.
>
> However:
>
> There is no such thing as a "64 bit Java program".
>
> The .class files that are generated are the same for 32 or 64 bit. There is no "32 bit compiled code" in Java.
>
> The only difference is the JVM which is used to run those class files. The biggest difference between running on a 32bit JVM and a 64bit JVM is the maximum available memory that you can configure (and that is accepted by the "java" launcher).
>
>
>
>

--
ArbolOne.ca
Using FireFox and Thunderbird.
ArbolOne is composed of a group of students and volunteers
dedicated to providing free services to charitable organizations.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Java 64 bit compilation combined with 32 bit compilation.

tkellerer
In reply to this post by Zachary1234-2

Papa wrote:
> I'd really like to know the answer to Zachary1234 questions, but if someone can clear up my understanding of Java before hand, that'll be nice too.
I answered that, and you even quoted my answer:

> The .class files that are generated, are the same for 32 or 64 bit.
> There is no "32 bit compiled code" in Java.




Loading...