K
K
Kirill Zhilyaev2014-08-01 17:11:53
Java
Kirill Zhilyaev, 2014-08-01 17:11:53

How cross-platform is java?

On ubuntu the server works without problems. But on windows there are a lot of errors in the command line. Maybe you need to compile the program on windows? Or some libraries are not cross-platform?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
Evgeny Khabarov, 2014-08-04
@kirill_782

We need to deal with errors.
In general, a once compiled class will run on the same or newer version of the Java Virtual Machine without problems. But, it will not run on an older version, which will result in an appropriate error.
The environment for running a Java machine for different platforms is configured a little differently. For example, for Unix/Linux systems, the element separator in the CLASSPATH variable (paths for searching classes and class libraries are set in this variable) is a colon, and for Windows, it is a semicolon.
There are other nuances, for example, different default encodings for different platforms, which can cause the configuration files of the libraries used to be read incorrectly. Everyone has already said about the use of Native libraries.

S
Sergey, 2014-08-01
Protko @Fesor

May affect: JRE version, native libraries used (if used), etc.

N
Nikolay Nozdrin-Plotnitsky, 2014-08-01
@scientistnik

Java runs on a virtual machine. What you can put a virtual machine on, it will work there. You can read about it here .

S
Sergey Zuev, 2014-08-01
@dygger1

In Windows, things are not so simple. Java needs the $path environment variable to work correctly.
More details here:
www.java.com/en/download/help/path.xml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question