You have taken the quote out of context. The full context is this:
64-bit Java
How is native code affected?
...
When porting 32-bit native code to 64-bit Java platforms, you will need to modify you code to be 64-bit clean. This involves examining your C/C+ + code and looking for code that assumes the size of a pointer to be 4 bytes or that a pointer can be cast and stored in an integer. Long data types are also troublesome when porting 32-bit code. You should avoid the use of longs if at all possible since longs have different sizes on different operating systems even in 64-bit. Windows 64-bit platforms define longs to be 4 bytes but most Unix operating systems specify that longs are 8 bytes in size. For more details, refer to the links below under learning more about 64-bit programming.
To answer your questions:
Java size of long type?
The Java long type is 64 bits on all platforms.
What does this quote mean?
It is self evident, but it is clearly NOT referring the the Java long type. It is referring to the use of the C or C++ long type in native code.
When I want to store value more than ~2^31, how JVM store this value?
In Java code, use long. It works. The JVM implementation takes care of it in different ways on different platforms. Don't worry about it.
In C / C++ native code you have a problem if you want your code to be portable. But the original article provides you with links to help you get your head around the problem.
In calculations, JVM use RAX, or EAX register?
The Java language specification requires that long has a 64 bit (no less, no more) representation, and that all long op long arithmetic is performed with at least 64 bits of precision so that the answer is the same on all platforms.
The actual implementation depends on the platform. The JVM / JIT compiler will (most likely) chose registers and instructions that are most efficient for the current platform.
Bear in mind that the JVM you run on a 32 bit Windows Intel platform is different to one for a 64 bit Windows Intel platform, or Solaris, ARM, and so on. For many of those platforms there are no registers called RAX and EAX.
But if you really need to know, look at the source code, or use the JVM option for dumping the native code emitted by the JIT compiler.
Answer from Stephen C on Stack Overflowjvm - Java size of long type - Stack Overflow
Which is larger? Long vs Double
[Java] Size of a long?
Java Beginner: Confused on why "L" is needed at the end of a long value
Videos
Iโve tried looking for definitive answers but the only difference I see seems to be based on the precision of the numbers?
Which data type is larger and which one is smaller?
For a school project, we're supposed to work with longs in encoding and reading from .dat and .idx files.
So for example, encoding a 0 into a file would encode 0000 0000 0000 0000. I'm trying to puzzle through the definition of longs, and according to the java docs, a long is 64 bits, or 8 bytes.
So for a long 0000 0000 0000 0000, how does this correspond to 8 bytes if there are 16 zeroes in total?