Java VM's role in the thing


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Java VM's role in the thing

  1. #1
    DavidB Guest

    Java VM's role in the thing


    in java there's 3 levels of operation you can distinguish regarding this example.
    your code would be the first: that's the .java file you type. second would
    be the compiled version of that file, the .class file, also refered to as
    bytecode. the bytecode is useless to your machine until it is converted
    into your processor's native assembly language. the Java Virtual Machine
    converts that in realtime (hence some complaints that java is still not as
    fast as some non-platform-independent languages, C and C++ usually). the
    likes of C++ are languages without VM's, so they have only 2 levels of operation
    regarding this example. but the VM intermediary step is what opens up java's
    write-once, run-anywhere ability. the VM is actually a program which is
    not platform-independent. it must be written and compiled for a specific
    processor, so Intel, SPARC, and Motorola all have different VM's, for example.
    happy coding.

  2. #2
    Raj Guest

    Re: Java VM's role in the thing


    Hi David

    Thank your for your response. It certainly clears the picture. However, I
    do have one question.

    According to your reply, it means that each environment has it's own JVM
    and that your code would first be compiled to bytecode and then 'run' by
    the JVM.

    Can you create a .exe program file in Java. If so, how would you run this
    program as platform independent on different environments or must you only
    run the program as a .class file from the JVM.

    Thanking you for your kind advise

    Raj

    "DavidB" <db@inctools.com> wrote:
    >
    >in java there's 3 levels of operation you can distinguish regarding this

    example.
    > your code would be the first: that's the .java file you type. second would
    >be the compiled version of that file, the .class file, also refered to as
    >bytecode. the bytecode is useless to your machine until it is converted
    >into your processor's native assembly language. the Java Virtual Machine
    >converts that in realtime (hence some complaints that java is still not

    as
    >fast as some non-platform-independent languages, C and C++ usually). the
    >likes of C++ are languages without VM's, so they have only 2 levels of operation
    >regarding this example. but the VM intermediary step is what opens up java's
    >write-once, run-anywhere ability. the VM is actually a program which is
    >not platform-independent. it must be written and compiled for a specific
    >processor, so Intel, SPARC, and Motorola all have different VM's, for example.
    > happy coding.



  3. #3
    Paul Clapham Guest

    Re: Java VM's role in the thing

    But .exe program files _aren't_ platform independent. They only run in
    Microsoft environments. Java .class files, however, _are_ platform
    independent and can be run on any system that has a JVM. For example, I
    have a package of .class files that were originally written on a UNIX system
    and are now in production on my AS/400 system.

    Raj <jstudent01@hotmail.com> wrote in message
    news:38fb404d$1@news.devx.com...
    >
    > Hi David
    >
    > Thank your for your response. It certainly clears the picture. However, I
    > do have one question.
    >
    > According to your reply, it means that each environment has it's own JVM
    > and that your code would first be compiled to bytecode and then 'run' by
    > the JVM.
    >
    > Can you create a .exe program file in Java. If so, how would you run this
    > program as platform independent on different environments or must you only
    > run the program as a .class file from the JVM.
    >
    > Thanking you for your kind advise
    >
    > Raj
    >
    > "DavidB" <db@inctools.com> wrote:
    > >
    > >in java there's 3 levels of operation you can distinguish regarding this

    > example.
    > > your code would be the first: that's the .java file you type. second

    would
    > >be the compiled version of that file, the .class file, also refered to as
    > >bytecode. the bytecode is useless to your machine until it is converted
    > >into your processor's native assembly language. the Java Virtual Machine
    > >converts that in realtime (hence some complaints that java is still not

    > as
    > >fast as some non-platform-independent languages, C and C++ usually). the
    > >likes of C++ are languages without VM's, so they have only 2 levels of

    operation
    > >regarding this example. but the VM intermediary step is what opens up

    java's
    > >write-once, run-anywhere ability. the VM is actually a program which is
    > >not platform-independent. it must be written and compiled for a specific
    > >processor, so Intel, SPARC, and Motorola all have different VM's, for

    example.
    > > happy coding.

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center