File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is the Java compiler, platform dependent....???

 
Amit Das
Ranch Hand
Posts: 206
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i've a doubt in my mind about the JDK itself. JDK(Java Development Toolkit) comes as a package which includes the compiler and the JVM.....

now is the compiler platform dependent??? if yes, why? if no, why??

i know the JVM is platform dependent...right!!!but what part of the JVM is depending on the platform......???

all sapients out there plz clear the haze

thanx
amit
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amit

I think that the Java compiler itself is not platform independent. It's because different platforn communicate differently. The bytecode (the resultant code) which is generated is platform independent.
 
Amit Das
Ranch Hand
Posts: 206
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Anupam,

whatever u've written, i already knew(i've doubts on Compiler being platform dependent..)

neways.....thanx
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Compiler (javac.exe on a Windows platform) is platform dependent in the sense that you cannot take javac exa and run it on a Linux, Symbian, Solaris or Apple Mac platform. Large portions of the JRE (Java Runtime Environment) are also platform dependent as they have to access the underling differences in operating system, and parts of this rely on native code fir optimisation.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic