How java is platform independent

in java we need jre to be present in target machine?
in that case how its possible that we should expect jre to present in tha target machines
why cant we have inbuilt compiler and interpreter that produces the common machine specific code that does not needs the help for jre to run?????

in java we need jre to be present in target machine?
in that case how its possible that we should expect
jre to present in tha target machines
why cant we have inbuilt compiler and interpreter
that produces the common machine specific code that
does not needs the help for jre to run?????it's possible that we can expect the JRE to be present in target machines because you can specify that a JRE is a prerequisite to your customers. of course, oftentimes one can just ship a compliant JRE with your application. that's what we do, which guarantees us that the target machine has a JRE and it's compliant with our code
what does 'inbuilt' mean? to the target machine? how do you enforce that?? if you mean inbuilt to your code, see above

Similar Messages

  • How do u say java is platform independent

    how do u say java is platform independent.....when a .class file for a program cannot be executed in another system with no java installed in it.......

    Pictograms are language independent (sort of)
    do you expect them to work in the land of the blind?

  • Why java is platform independent ?

    what is the meaning of java is platform independent ? is it just because of java code can be run in windows/linux/unix platform ? but then C/C++ also can be run in windows/linux/unix . so why those are not called platform independent ?
    why java is called platform independent ?

    c/c++ creates object code . similary java creates bytecode . java uses interpreter JVM to execute . similary c/c++ object code also executes in any platform. so where is the real difference ?
    the classes do not need to be recompiled for different platforms. what do u mean by this ? ".....classes ( i.e bytecode) dont need recompilation ..." .....ok....but same thing is true for C/C++ object code also !! they also dont need recompilation.
    where is the difference ?

  • Tips on avoiding hard coded paths and make a java app platform independent

    HI all,
    I would like to gather some tips on how to avoid hard coded file paths, which are plenty in the application I work on and which I inherited from previous programmers.
    Also, when deploying to the production server, my app goes from a Windows platform to a Linux machine.
    I am curious to know what tricks and tools other programmers find useful in similar contexts.
    I am sure many of us would benefit from the discussion.
    Thank you !

    Actually, Java does this for you; you can use unix-style paths and they will still work, even on Windoze. To wit:
    public static void main(String[] args) {
            File f = new File("/");
            System.out.println(f.getAbsolutePath());
    }Yields: C:\
    public static void main(String[] args) {
            File f = new File("/Program Files");
            System.out.println(f.getAbsolutePath());
    }Yields: C:\Program Files

  • Java is Platform Independent - good, but why is it not version independent?

    Dear developers,
    Development in java is becoming so independent to its versions. The code which works fine on 1.2.0 may or may not work on 1.3.1 and which works on 1.3.1 dont work fine on 1.4.0. I have been experiencing these problems from quite a few time. So i just want to know am i doing a mistake or java is like that only.
    And even if a code works fine on 1.4.1 with using only methods and classes available right from 1.2.0 also didnt work properly on 1.2.0. So how can we go confidently in to Production.
    Problems faced in GUI using Swing Components and In Socket Connections using HttpURLConnection kind of code.

    Development in java is becoming so independent to its
    versions.Actually Development in java is becoming so dependent to its
    versions is what i mean.

  • 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.

  • Java platform independent.what is a platform?

    This question has been haunting me for a long time.
    When we say Java is platform independent,what does the term platform
    indicate?
    I think it is Processor+Operating System.
    But people talk only of Operating System as platform.
    A processor has its own instruction set that is different from that of other processors.An executable code on one processor doesn't run on another processor,whatever may be the operating system.
    Java code is platform independent because it is just compiled to byte code and that byte code is interpreted and run on a JVM.Here the JVM is different for different platforms.
    My question is:
    consider two platforms:
    Intel Pentium+MS Windows.
    and AMD Athlon+MS Windows.
    Is the same JVM used for both these platforms?or not?WHY?
    If only Operating System is Considered as platform,what happens to the underlying processor?

    <troll style="flamesuit: on;">Java is not plateform inderpendent, java runs on one plateform, the Java Platform.</troll>
    The "Intel / AMD + MS Windows" is two forks of one plateform, the x86 / Windows plateform.
    You could extends the x86/Windows JVM to include Intel extras in such a way that it would not run on AMD/Windows.
    One way you could define a plateform is as a binary format, processor intuction set and public API.
    So java == .class format, bytecode and the java.* packages
    and Linux x86 == ELF, x86 and POSIX (plus others, such as X)
    and FreeBSD x86 == ELF, x86 and POSIX (plus others, such as X)
    and Cygwin == ELF, x86 and POSIX (plus others, such as X)
    and Windowsx86 == PE, x86, MFCs
    But does that mean Linux, FreeBSD and Cygwin are the same plateform, well kind-of, they are all unix-sqe, and in some cases the binarys are interchangable (a small plug in to FreeBSD will let you run Linux software, the same sort of thing is aviable to Solaris, and some very small (hello world-level) will actually run (I've seen this in the case of a Linux HelloWorld on a BeOS machine).

  • 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 !

  • Platform Independent

    Java is platform independent.What do u mean by paltform independent?

    platform Independent does'nt mean once compiled
    its means it can run without the help of platorm(os)
    jvm provides pltfom indepent to java but
    jvm is also os specific means there is different jvm for widows ,
    different for linux,and diiferent for mac
    there is two layers in jvm
    first interact with byte code
    & second interact with platform(os)
    in mobile applicatoin jvm directly produce output bcz jvm is interpreator

  • Platform independency...any chance ?

    hi...java code (.class files ) are platform independence. It is supposed to run any platform.(i believe this) [ // it is fine in different  windows machine ].
    However, i was in argue with my friend..... He told that each platform (windows,Unix,Macintosh) have different JVM . so there is a chance that the class file may be rejected by the JVM in different platform.
    is it true ?
    if Yes.......then independency is lost !!! i can not call it is a pure platform independent.......are people trying for any remedy ?

    There are many different JVMs. Sun makes JVMs, IBM makes JVMs, M$ used to make JVMs, I think Blackdown makes JVMs, etc.
    As long as a JVM matches the spec, then a given class file is portable across different VMs. Just like if I create a Word doc on the PC, I can read it with word on my Mac.
    BUT (you knew there was going to be a "but", didn't you), there are different versions of VMs and the spec has changed over the years. Just like MS Word from 1990 probably won't read a document you create with the MS Word that you buy today, similarly you need to make sure the version of your class file is no newer than the VM. If the class file is an older version than the VM, it will generally work--they're backward compatible that way. Or is it forward compatible.
    Also, there are things that are legal Java code that won't necessarily translate from one platform to another that well. GUI stuff can be slippery that way, I understand. Some other things too, but I forget what.
    Is Java perfectly platform independent in that any class file generated anywhere anytime is guaranteed to run on any other VM? No, of course not.
    Is it easy to create applications that you can run with no changes on Mac, Windows, Linux, Solaris, and maybe others that I'm not aware of? Absolutely. Many of the apps I've developed in the last few years have been developed and unit-tested on Windows (and even Mac to some extent) and run on Linux or Solaris, without me even needing to think about it. (Not that you never need to think about it, but it's not an overriding concern.)

  • Determining free disk space in a platform independent "java-like" way?

    how can i determine free disk space in a platform independent "java-like" way?

    Search the forum "free disk space".

  • How can i change backgroud color in Java ME Platform SDK 3?

    Hello.
    Yesterday i had donwloaded Java ME Platform SDK 3.0. It is IDE based on NetBeans core, but i didn't find any facility to change default colors. (NetBeans have option to change color theme). I am don't like working when background color is white, i prefer black. So, how change a background color? Can anybody help me to figure this problem out?
    p.s. sorry for my bad english (

    Hello,
    Unfortunately it is not possible. We will think about it for next release. Java ME SDK is not supposed to offer full IDE functionality (e.g. changing editor colors), that's why some features are missing. For full IDE support use NetBeans IDE with Mobility support.

  • How do I search the downloaded Java? Platform, Standard Edition 6 API?

    I am a newbie to Java (I had done some limited programming in C ++ years ago). I have downloaded the Java? Platform, Standard Edition 6 API Specification, and can view this in my Firefox browser. How can I search to certain classes in this documentation easily? For instance, if I want to ding out all of the operations available for String or System.out, etc, , is there a way that I can type in System.out, or String somewhere, and get a list of what is available?
    Thanks

    Brian_Rohan wrote:
    Here is the code that I compiled and it worked:Yeah, "args" there isn't part of the API. It's the name of the variable that is the first parameter to the main method defined there.
    The stuff between the parentheses is a list of declarations of local variables that form the parameter list to that method, to put it technically.
    The thing that's part of the API is the class String. In "String[] args", the bit on the left is the type of the variable, and the bit on the right is name of the variable. A name of something you define like that wouldn't be in the API. However, the name of the class String is.
    If you look at the import statements, you'll see if the name "String" is actually shorthand for a class defined elsewhere. There's this:
    import java.util.*;So you can know that "String" is either defined in the java.util package, in the "helloworld" package (which also wouldn't be in the API because you're defining in there using the package keyword), or in java.lang. (The "java.lang" package is automatically imported.)
    You could look in the API docs for java.util.String or java.lang.String to find the class definition. But I'll save you the time by letting you know that it's actually java.lang.String.
    Again I am new at this, what would args.length be?You'll see that the type of the "args" variable is "String[]". That means that it's an array of String objects. (The [] means arrays.) Arrays all have a field called "length". This also is part of the language, not the API, so it would be in a language guide, not the API.
    The value of args.length would depend on how you ran your program. When you run a program on the command line like this:
    java HelloWorldor this:
    java HelloWorld foo bar bazThe java virtual machine takes all the things after the class name and sticks them in an array of String. Then it looks for a static method named "main" in the HelloWorld class, and passes it that array. So in the first case above, args.length would be zero, and in the second case it would be three.
    By the way, when you post code, please wrap it in code tags. Highlight it, then click the "CODE" button above the text input box.
    Edited by: paulcw on Nov 4, 2009 6:35 PM

  • 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

  • How do I update Java(TM) Platform SE 7 U51Next Generation Java Plug-in 10.51.2 for Mozilla browsers

    I am suggested by the mozilla plugin manager that I need to UPDATE Java(TM) Platform SE 7 U51Next Generation Java Plug-in 10.51.2 for Mozilla browsers
    How do I do that and ask for it to be updated automatically
    Thanks in advance

    Hello eserub1, if you can not update from the next link : https://www.mozilla.org/en-US/plugincheck/ , choose the button '''Update Now''', then you have to manually install the offline version from the next link : http://www.java.com/en/download/manual.jsp (before you do that uninstall java from control panel > add or remove programs) and then install the new version.
    Note that because xp is unsupported for almost a year maybe it is better to do that manually (i do it in my xp !)
    thank you

Maybe you are looking for

  • Is there any way to open a map to the location specified in a calendar event?

    Besides opening the event, copying the location, and pasting it into google\bing\etc mapping tools I do not see this rather common functionality available in Lightning. Ideally, right clicking on the event in the calendar (without opening the event)

  • Enhanced Rebate settlement - item not relevant for billing

    I'm trying to settle an enhanced rebate agreement & i continue to get the error "Item is not relevant for billing".  I'm using the materials for which the rebate was accrued as the settlement materials via the configuration for a variable key.  I've

  • TREX Index not searching all entries in KM folders

    Hi I am having an issue with some links\documents that are not being indexed by my TREK search service.  I have an index setup and the folders and links that are manually created are indexed properly and can be searched.  The issue is for online link

  • 1439467 SUIM| RSUSR70: Runtime error DBIF_RSQL_INVALID_RSQL is not availabl

    Currently SAP Note 1439467 SUIM| RSUSR70: Runtime error DBIF_RSQL_INVALID_RSQL is not available. When searching the note in http://service.sap.com/notes error message The requested SAP Note is either in reworking or is released internally only is dis

  • Vertical Photos?? Double copies!?

    I've imported a few vertical photos from my camera into Iphoto. It automatically makes duplicates of these photos in the modified folders - which annoys me because it's a waste of space. The originals of the photos are displayed as vertical too eithe