• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 43081
77
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic