Why java is called platform independent? "write once, run anywhere" code...

I do have a answer for this. Please shed some light whether i am right or wrong.
When you say java as platform independent, it means that, any java program once compiled to java class can be transferred to anyother machine(say, from windows to unix) can be executed, provided the destination machine has JVM.
where as, in C/C++, if we transfer the object files from one machine to another machine, they will not be executed and they have to be re-compiled in the other machine.
Am i correct?
please, do give me your idea on this...
thanks...

Thanks george !

Similar Messages

  • Why java is called platform independent

    Hello
    Why java is called as platform independent?Any body please give a detailed explanation since im a beginner to java technology.
    ThankYou
    Jk

    BigDaddyLoveHandles wrote:
    georgemc wrote:
    SunFred wrote:
    Java is not platform independent since it depends on the Java platform ;)Don't complicate matters!I always thought the phrase should have been "platform agnostic"It's a phrase I've used meself

  • Write once, run anywhere philosophy

    Here is the text from JAVA2COMPLETE Reference about Character Streams.
    While the byte stream classes provide sufficient functionality to handle any type of I/O operation, they cannot work directly with Unicode characters. Since one of the mainpurposes of Java is to support the�write once, run anywhere� philosophy, it was necessary to include direct I/O support for characters. My doubt is that Why is that WRITE ONCE RUN ANYWHERE philosophy not applicable for Byte Streams.

    Here is the text from JAVA2COMPLETE Reference about Character Streams.
    While the byte stream classes provide sufficient functionality to handle any type of I/O operation, they cannot work directly with Unicode characters. Since one of the mainpurposes of Java is to support the�write once, run anywhere� philosophy, it was necessary to include direct I/O support for characters.
    My doubt is that Why is WRITE ONCE RUN ANYWHERE philosophy not applicable for Byte Streams.

  • Programming on SIM??? write once, run anywhere???

    Dear all,
    I am a java developer for 2 years, everytime i read any java book, it stated there "write once, run anywhere", but does it really perform that? especially when we develope in J2ME, MIDP, CLDC is a main consideration for different phone. Different phones requires different CLDC n MIDP, developer have to develope different program for that. But, if we can develope program into Java SIM card, is that make sense of the phase "write once, run anywhere"?
    Due to the limited space, limited processor power, limited RAM on a little SIM card... how about we have a brainstorming session here to discuss about what kind of program that mobile phone user really want in their SIM? SIM card program is interoperability with every phone, and i think user will prefer to store more personalized things to SIM.......
    So, do u guys have any ideas on SIM?
    Best regards,
    Ric

    What does the fact that Java6 doesn't exist onOS/X
    have to do with anything? Java6 didn't make
    enough
    changes to swing that it matters.
    The tray icon capability is a new feature in Java6.
    and Mac OS doesn't have a system tray like Windows
    does so there's nowhere to display the icon...http://www.ubuntu.com/
    It's for the best, really.

  • Does "Write Once, Run Anywhere" (WORA) really exist?

    Does "Write Once, Run Anywhere" (WORA) really exist?

    Absolutely. You can write applications that will run on any
    J2EE-compatible application server. Although a few cases are very
    difficult, in many cases more can be done than you may realize. Java
    BluePrints (http://java.sun.com/blueprints) is the proof point here.
    Each year, we run the Deployathon
    (http://java.sun.com/developer/technicalArticles/J2EE/deployathon4/)
    which demonstrates a significant J2EE application running on multiple
    J2EE-compatible application servers.

  • "Write once, run anywhere" - Error on MacOS X running TrayIconDemo - JNI?

    I can not get the TrayIconDemo running on MacOS X... "Write once, run anywhere" broken? How can I use pure Java when I have to write MacOS X specific trayicons to get around the fact that MacOSX does not support lastest Java, and no official say when Java will be avalibale.
    http://java.sun.com/docs/books/tutorial/uiswing/examples/misc/TrayIconDemoProject/src/misc/TrayIconDemo.java

    What does the fact that Java6 doesn't exist onOS/X
    have to do with anything? Java6 didn't make
    enough
    changes to swing that it matters.
    The tray icon capability is a new feature in Java6.
    and Mac OS doesn't have a system tray like Windows
    does so there's nowhere to display the icon...http://www.ubuntu.com/
    It's for the best, really.

  • Write once run anywhere

    Is it possible to write one application that can run on Notebook, Palm OS and Win CE PDAs ?
    If can, how? What tools and APIs do I need? How about the jvm?
    If can't, why?
    I need to know it asap, waiting for your helps, thanks.

    Hi!
    I don't think so. There is no unique VM availale to that variety of platforms.
    The big problem is to get a VM that runs under those platforms. There is one kind of VM available to PDAs - personal Java -, other to notebooks and PC's - J2SE -, other to Palm devices - J2ME CLDC MIDP-.
    3 VM to three kind of devices with different features, although the Personal Java apps probabily would be compatible with J2SE...
    Marco Caetano

  • JNI Not write once run anywhere But...

    I have written a program that I put into C++ for speed reasons. I now want to use the JNI to
    a) Get familiar with the JNI
    b) To merge a Java GUI and speedy code together.
    I've read that if you use the JNI then you cannot run your program everywhere. But I thought about programs written in C/C++ that do run everywhere, with respect to say the OS.
    So isn't it possible to still have that via the JNI?

    I have written a program that I put into C++ for
    speed reasons. So, you measured the speed of a Java prototype and a C++ prototype and found the Java version to be significantly slower?
    Or you just assumed it would be?
    I've read that if you use the JNI then you cannot run
    your program everywhere. But I thought about programs
    written in C/C++ that do run everywhere, with respect
    to say the OS.You may be able to use the same C/C++ source code, depending on what it's doing, but you'll at least have to recompile the native code. A Windows DLL can't be used on a Linux box.

  • Why java is called java2

    why java is called java2 and another thing that i would like to know is why it was renamed to java from its previous name OAK
    Thanx
    Manish

    why java is called java2Not to sure about this one, but I think it was a marketing decision - I guess 'Welcome to the Java 2 platform' sounds better than saying 'Welcome to the JDK 1.2.1 platform' :=)
    and another thing that i
    would like to know is why it was renamed to java from
    its previous name OAKThere was already a patented product named 'OAK', so they had to rename it to something else to avoid the law.
    >
    Thanx
    ManishA brief history of Java:
    http://java.sun.com/features/1998/05/birthday.html
    http://www.ils.unc.edu/blaze/java/javahist.html

  • Java is   NOT   Platform Independent ????????

    Hai.
    My friend told ...
    we can able to say java is platform independent.
    but
    in one company (software anaylist) ask
    talk about java is not platform independent...
    so how its possible..
    plz i want clear cuts...
    even i search in google also.. but i cant get clearlly.........
    yours
    advance happy pongal and upcomming festivals
    drvijayy2k2

    >
    A quick example I recently encountered of platform
    dependence was in character encoding/decoding. Have
    a look at how Solaris, Linux and Windows print out
    the full range of bytes when they are encoded as
    Strings. There are lots of little differences, happy
    discovering.This is a good illustration. By default java uses the character encoding which it believes to be in general use on the platform it's running on, but you can specify the character encoding explicitly. So, by default, the Java program addapts it's exact behaviour to the platform.
    Is "a platform independant" program one which produces the same file format on systems which will interpret that file format different ways? Or is it one that generates a file format that will produce equivalent results on two different systems?
    There's a similar dilema with "look and feel" (i.e. window gadgets etc.). Should a platform independant program use the same look and feel on systems whose native look and feel is different, or should it "blend in"?
    Java leaves these choices to the programmer.

  • Why java is called as true object oriented language?

    HI Friends,
    Though few oops concepts is not supported , why java is called as truly object oriented language and C++ as not a purely object oriented language???? Please, if any one know , give me the answer.
    Thanks to all.

    few oops concepts is not supportedwhich concepts?
    as far as i know...to be OO, you must supports
    encapsulation, abstraction, inheritancxe, composition (aggretration, et all) and polymorphism. Java supports all those comcept..now..Java is a hybrid due to what Jverd has pointed out.
    the only pure OO language that i know of is SmallTalk. they have Meta class that can create Class object. and all their primitaives are object.
    C# comes close, but their Class are not object.

  • Why java is called pure object oriented.

    i know that java is called as pure object oriented language.
    why it is called so even though it has primitive datatypes and also it doesnot support multiple inheritance completely. it only supports in the case of interfaces but not in the case of classes. then why it is called pure object oriented.

    Its because you cannot write an executable java program without creating an object. Well, you can:
    public class a
      public static void main( String a[] )
    }In contrary to C++, there can be no variables or functions in the wild (outside a class).
    You can not create an executable java program without creating a class (but not forcibly its instance, an object.)
    The "pure object oriented" wording in this sense has not really much importance, it is rather a marketing ploy.

  • Java is a platform independent

    how can we say that java is a plateform independent language, would u like to send me an example and procedure.
    thanks in advance.

    Oh, on review of your posting history, I see that you have been asking a bunch of similarly strange short questions today, that they do appear to be homework, that you often spam the forums with similar cross-posts, post incorrectly (and for god-knows what reason) to the "forums.sun.com News and Updates" forum, that you rarely reply to these strange requests and that Google appears to not be working on your computer. Please show that you are doing at least a small bit of your own work here, you lazy sod.

  • Why Java does the compound operator conversion (once again)

    Hello to all,
    can anyone repeat for me the motivation, why the early Java Language designers introduced the narrowing conversion into the compound operators? (E1 op = E2 is
    equivalent to E1 = (T )((E1) op (E2)), where T is the type of E1, except that E1 is evaluated only once)
    I can pretty well understand the reasons, why it cannot be changed any more (it is an incompatible change - http://bugs.sun.com/view_bug.do;jsessionid=67cacbc1afced76921b2264b6fd9c?bug_id=4655168). But I cannot see the reason, why to introduce it at the first place.
    Thanks a lot for any answer.
    Edited by: gree on 13.4.2010 12:33

    I never told, I do not like that.You raised Occam's razor, which is the principle that entities should not be multiplied needlessly. If you don't consider it a needless multiplication of entities why introduce it?
    According to you answer, I presume ...I stated my view explicitly. No need for you to presume anything.

  • What about "write once, run everywhere" with web services ?

    Hi all,
    I'm very new to web services in Java (but not new at all in Java and not really new in web services).
    I'm amazed of not finding a specification API for web services. It doesn't seem that I can write a web service (or a web service client) and run it under several "web services containers" (like we can do for servlets, JDO and pretty all java technologies). It seems - according to the tutorials I found yet - that if I want to make a web service that runs under Apache Axis, I must use org.apache.axis.* classes, and so on with WebLogic and other web services container...
    It doesn't look like java style and I'm kind of confused...
    could someone give me details ? am I wrong or something ?
    TIA

    I think is not that bad.
    You have two APIs in the jwsdp tool just for web services (JAXRPC and JAXM) and you can construct your web services and your clientes wit that. Once you compile with the tool and you get the WSDL and the model I think that you can deploy it in any container (I think)
    hope it hepls

Maybe you are looking for