Bookmark Topic Watch Topic
  • New Topic

Java Compiler and JVM are platform dependent or independent?

 
sujitha reddy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
Java Compiler and JVM are platform dependent or independent? if they are independent how?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64958
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Not a servlet question. Moved to Java in general.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Report post to moderator
> Java Compiler and JVM are platform dependent or independent?

from the downloads page

http://java.sun.com/javase/downloads/ea.jsp

click the [Download] button next to JDK6 Beta 2, for your answer
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same question to more than one forum. See here for an explanation of why I just deleted the other copy of this thread.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
First, you would have to precisely define the term "platform independent." Then, given that definition, your question could be answered. But just asking whether something is "platform independent" without explaining what that means to you just starts an argument between people who don't realize that there are different ways to define this term.

So if you want a sensible answer, you have to refine your question further.
 
Nitin Jain
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
Java Compiler and JVM are independent of each other, Java Compiler and JVM both are platform dependent.

Java Compiler - this is used to convert java program in the form of "Byte Code" that is nothing but class file and this compiler is coming different for different platform (windows, linux etc) so this is plateform dependent.

JVM - Use to run "Byte Code", this byte code is common for all the plateform, because all the compiler converts java code into the byte code that is common for all, and JVM can understand only byte code and can run this byte code on any platform, but again you required compitable JVM for that plateform.

Result - both Java Compiler and JVM are platform dependent but Java Applications are platform independent, because you can take byte code(.class file) to any other platform and can run using JVM.
 
Vlado Zajac
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sun's java compiler is written in Java and so it is platform independent in the same way as other Java programs. (Only the JVM and launcher program are platform dependent).

Other compilers may not be written in Java.
 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Report post to moderator
Java Compiler and JVM both are platform dependent.
Only the byte code (class file) generated by Compiler is platform independent.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Mmmkay, that'll be enough nattering for now.
 
    Bookmark Topic Watch Topic
  • New Topic