Java is said to be platform independent. Because, all the java codes will be running on JVM (Java Virtual Machine) where as c and c++ are depends on the operating system. First the JIT (Just in Time) compiler convert the program into byte code (that is .class file) once you compile it on JVM.
The byte code has the capability to run on any operating system if OS has JVM.
So, Java is definitely Platform Independent Language.
I learn so much here from noobs.... NOT!!
Java is compiled into bytecode. A JIT compiler compiles the bytecode into JVM executable machine code. I'm not about to dig any deeper... Java is platform independent for the same reason ionCube PHP is independent LOL. Bytecode is bytecode, and although it isn't source, it isn't fully compiled code either.
So (adding something to the thread...) what are the current Java issues:
Security
The Java platform provides a security architecture which is designed to allow the user to run untrusted bytecode in a "sandboxed" manner to protect against malicious or poorly written software. This "sandboxing" feature is intended to protect the user by restricting access to certain platform features and APIs which could be exploited by malware, such as accessing the local filesystem, running arbitrary commands, or accessing communication networks.
In recent years, researchers have discovered numerous security flaws in some widely used Java implementations, including Oracle's, which allow untrusted code to bypass the sandboxing mechanism, exposing users to malicious attacks. These flaws affect only Java applications which execute arbitrary untrusted bytecode, such as web browser plugins that run Java applets downloaded from public websites. Applications where the user trusts, and has full control over, all Java code being executed are unaffected.
On August 31, 2012, Java 6 and 7 on Microsoft Windows, Mac OS X, and Linux were found to have a serious security flaw that allowed a remote exploit to take place by simply loading a malicious web page. Java 5 was later found to be flawed as well.
On January 10, 2013, three computer specialists spoke out against Java, telling Reuters that it was not secure and that people should disable Java. Jaime Blasco, Labs Manager with AlienVault Labs stated that "Java is a mess. It?s not secure. You have to disable it."This vulnerability affects Java 7 and it is unclear if it affects Java 6, so it is suggested that consumers disable it. Security alerts from Oracle announce schedules of critical security-related patches to Java.
On January 14, 2013, security experts said that the update still failed to protect PCs from attack. This exploit hole prompted a response from the United States Department of Homeland Security encouraging users to disable or uninstall Java. Apple blacklisted Java in limited order for all computers running its Mac OS X operating system through a virus protection program.