Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Java Compiler and JVM are platform dependent or independent?  RSS feed

 
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?
 
Author and ninkuma
Marshal
Posts: 66789
168
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.
 
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
 
author and iconoclast
Sheriff
Posts: 24220
40
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
Sheriff
Posts: 24220
40
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.
 
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.
 
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.
 
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
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Mmmkay, that'll be enough nattering for now.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!