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

Basic Java Concepts Clarification

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need help with understanding some basic concepts. I started with Sun's online Tutorial. This has raised a couple of questions.
1.What does Java Virtual Machine constitute here? Please look towards the end of this webpage
2. Is this JVM version dependent? If I create a ".class" file with jdk1.4, will that run in a machine with jdk 1.3 (if the features/classes invoked in this program are available in jdk1.3)
3.What is a Client compiler ?

3. A Web browser runs an applet . How are the Java bytecodes "interpreted" here ?
4.what is a 'PLUGIN'? what is 'Microsoft VM' ?
5. Do the major web browsers(IE and netscape) run applets (compiled with jdk1.4) properly ?
Thanks,
Jennifer
[ May 17, 2002: Message edited by: Jennifer Wallace ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jennifer Wallace:
1.What does Java Virtual Machine constitute here? Please look towards the end of this webpage


The Java Virtual Machine (JVM) is the (program) layer between the Java bytecode and the operating system and actual computer. The JVM runs within the operating system (on the computer) and interprets the bytecode to be understood by a specific computer's hardware and operating system (as appropriate).


2. Is this JVM version dependent? If I create a ".class" file with jdk1.4, will that run in a machine with jdk 1.3 (if the features/classes invoked in this program are available in jdk1.3)


The JVM is version dependent. If your source code does include jdk 1.4 specific code and you didn't compile with the appropriate argument, then the code won't run on a previous JVM release. If you didn't include code that is not covered by the target JVM release, then no problems (to the best of my knowledge).
Take a look at Sun's documentation on javac for information on compiling "new" code to run on an older JVM.


3.What is a Client compiler ?


The Client Compiler interprets/compiles the Java bytecode to native/machine code.


3. A Web browser runs an applet . How are the Java bytecodes "interpreted" here ?


Sure - another number 3. An instance of the JVM is created (by the browser) to interpret the bytecode.


4.what is a 'PLUGIN'? what is 'Microsoft VM' ?


IE and Netscape both stopped supporting Java at version 1.1.2 (I think) and M$ stopped packaging Java with IE6 and Windows XP altogether (though M$'s Java Virtual Machine can be downloaded - it only supports to 1.1.2 - I think). To run applets that are newer, the user needs to download a plug-in for the appropriate browser that integrates with the browser to handle Java.


5. Do the major web browsers(IE and netscape) run applets (compiled with jdk1.4) properly ?


Not all by themselves, the aforementioned plug-in is required.
[ May 17, 2002: Message edited by: Dirk Schreckmann ]
 
Jennifer Wallace
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks!
Would there be a source where I could learn more details on how Browsers handle applets ? And the minor details like one browser having one feature but not another! Because I am running into weird kind of problems.
I have an applet compiled in jdk1.4 . Loads fine in IE 6. But there is nothing when the same HTML page is viewed in IE 5.5. The differences are confusing. How would you check which version of JVM is your browser capable of handling ?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Concerning the features of Java that are available to the browser, this is not specific to the browser but to the version of Java that the browser supports. If the browser has built in support for Java 1.1.8 and no plug-in has been installed, then only Java 1.1.8 (and previous Java release versions) features are supported by the instance of the JVM that the browser launches. There may, in fact, be some browser type/version specific interactions between a browser and a Java applet, but I can't think of any.
Your experience of having nothing displayed in the IE 5.5 browser would indicate that the version of Java that this browser supports is pre-Whatever-Version-You-Compiled-For.
The version of Java can be obtained by System.getProperty( "java.version" ) .
For more information on Java applets, you may wish to peruse Sun's Java Tutorial on Writing Applets
Good Luck.
 
Jennifer Wallace
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Dirk for your patient replies !
 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic