Win a copy of Rust Web Development this week in the Other Languages 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How is java a software platform and is c one as well

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

http://java.sun.com/docs/books/tutorial/getStarted/intro/definition.html



Sun states that java's as/w platform. Just wanted to clarify what's the idea behind this. And is C a s/w platform as well
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personally, I don't think C-the-language is a software platform. The standard JDK includes everything necessary to develop complete applications. While there are C libraries that allow all of the same functionality, they're separate from the C environment itself.
 
Marshal
Posts: 74627
335
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Java™ includes tools for creating programs, compiler, run-time, etc. That is why it is called a platform. And I agree with David that C isn't a platform.
 
Rancher
Posts: 600
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Other languages also use the JVM - JRuby, Jython, Groovy, Scala, clojure, etc., etc., etc..

John.
 
Shridhar Raghavan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey David,
Thanks for the post. But you mind explaining your point as to why despite coming with libraries that almost achieve the same functionalities that the java core libraries, "why are these c libraries together with c not considered a platform". The point am thinking out loud is what's the distinction. Both languages come with a bundle of libraries.
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The page you linked to actually does a decent job of explaining what is meant by "platform" in this context - it's the combination of cross-platform JVMs and cross-platform class libraries. That has two important consequences: 1) it's possible to write and compile code on one platform, and it'll run on other platforms, including the GUI parts, and 2) you can use other source languages -like the ones John mentioned- and compile them into code that is executable on the JVM.

As an aside, C does not come "with libraries that almost achieve the same functionalities that the java core libraries" - the standard C libraries are tiny compared with Java's. For example, no GUI functionality is included.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You compile C to native machine code, that runs directly on the microprocessor that you've compiled it for. In principle, you could write a C program that does not depend on any library at all (not even on the standard C library) - you can't do that with Java, because you always need the Java runtime environment (JVM + libraries) to run Java bytecode. When you write software in Java, it has to run on top of the Java runtime environment, so in that sense you could call it a "platform".

Ulf Dittmer wrote:As an aside, C does not come "with libraries that almost achieve the same functionalities that the java core libraries" - the standard C libraries are tiny compared with Java's. For example, no GUI functionality is included.


Indeed, the standard C library is very small and does not even include basic things like collection classes.
 
Shridhar Raghavan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yo. Alright taking into account Ulf and Jesper's comments, i guess the reason they called java a platform is the "cross platform benefit" and the "power packed libraries". A platform does not necessarily mean the ability to write s/w applications. Were that the case, every programming language would in essence be a platform. Guys let me know if i've missed anything.
 
Campbell Ritchie
Marshal
Posts: 74627
335
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you have missed everything about what a "platform" is. It is complete and self-contained. That is why it can offer independence from the operating system.
 
Shridhar Raghavan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yo. Alright taking into account Ulf and Jesper's comments, i guess the reason they called java a platform is the "cross platform benefit" and the "power packed libraries". It is complete and self-contained. That is why it can offer independence from the operating system.A platform does not necessarily mean the ability to write s/w applications. Were that the case, every programming language would in essence be a platform.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper Young wrote:you can't do that with Java, because you always need the Java runtime environment (JVM + libraries) to run Java bytecode.


gcj
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic