Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Is Java Plateform Independent ?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all Ranchers,
Please tell me is Java Platform Independent, if yes so why class file need JVM to run the application.

Please clear my doubt
and thanks in Advance
 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amitji Sharma:
Hi to all Ranchers,
Please tell me is Java Platform Independent, if yes so why class file need JVM to run the application.



Java is platform indepenedent...

Since Java is both compiled and interpreted language..we nedd "javac" to compile the java files and JVM to interpret the generated byte codes..

The JVM is defined to be platform dependent...
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Class files are platform-independent in that you can compile them on one platform and run them on any other platform that has a JVM of the same or a newer version. That doesn't change the fact that you need a JVM to run them.

Originally posted by Priyam Srivastava:
The JVM is defined to be platform dependent...



In this context it's probably better to be precise. The JVM is not platform-independent. To the contrary, it's closely bound to the platform it's written for. You've got no chance of using, say, a Windows JVM on any other platform. What is platform-independent is the "API" that the JVM implements, namely, the class file specification.
[ August 31, 2007: Message edited by: Ulf Dittmer ]
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic