Originally Posted by
j2vdk
java is platform independent.. right....
then how can u give this answer,,,
Java is "platform independent". I.E., code written on one machine, will run on every other machine for which a JVM (a java installation) exists. There
are some limitations, however.
The above
can be one of them. If, however, the files were compiled on an OS that
is case sensitive and packed into a jarfile, that jarfile can then be used on an OS that is
not case sensitive, because the Classes will be contained within the jarfile and, therefore, not contingent on the OS filesystems case sensitivity.
Another limitation is the use of Runtime.exec() or ProcessBuilder. If you use those, there is a 99.9999999999999% chance that the code is
not platform independent. This
can be gotten around, somewhat, by placing the commands to use in properties files (or something to that effect) and having one for each OS, as long as you are displaying the output of the commands, or executing a function. If the program tries to evaluate what the command produces, then
much more work would need to be done to accomplish
any kind of platform independence for that sort of thing. (A plugin architecture for that portion, maybe.)