New To Java Environment

Posted on 1998-06-24
Medium Priority
Last Modified: 2013-11-23
I am new to Java.  My company is looking to purchase an expense package. One happens to be coded entirely in "Sun Native Java" as the verdor says.  All of our client machines are either Windows95 or Windows NT 4.0.  I need clarification of the following:
Also, from a development point of view, is there a difference (classes, methods, packages, etc...) between Microsoft's Visual J++ and Sun's JDK?

I would like an definition of the Java Virtual Machine.  I don't understand how an applet or application can run on any machine.  What does the client machine need to have installed on it for Java to be interpreted?  Is it built into Windows95 or WIndowsNT??

I am sorry for the lame questions, but this site usually explains the basics very well.

Question by:mtgcpc
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 16

Accepted Solution

imladris earned 140 total points
ID: 1223627
Microsofts JDK is a superset of Suns.

The Java Virtual Machine is the magical bit. It is the interpreter (if you remember your basic). Java is compiled into bytecodes, which is an intermediate encoding; a kind of high level "machine" code. Except that the machine it is designed for is not a hardware machine. It is an imaginary "virtual" machine. This machine is "implemented" in the JVM. It interprets the stream of bytecodes. It has a stack and it knows what to do with the instructions, so when it, for instance, encounters a load byte code, it knows it must get the value from the stack, and store causes a value to be stored in a variable etc.

So for a Java program to run on a client machine, that is precisely what needs to be installed: the JVM.

It is distributed with Win95 and NT, but is constituted in a separate program. jview.exe is the top level piece (the one you would type on the command line to activate it).

Feel free to ask for further clarification on any of the points.

LVL 16

Expert Comment

ID: 1223628
P.S. so how does an applet or application run on any machine? It actually doesn't quite. To be more specific: it runs on any machine for which there is an implementation of the JVM (which is really a large program which interprets the bytecodes of the program you want to run).


Expert Comment

ID: 1223629
Visual J++ and SUN's JDK

SUN's JDK is the reference for Java developers. It is the development kit of the creators
of the language. Contrary to VJ++, it is not an IDE: you only have a Java byte code compiler,
a virtual machine and the classes to allow you develop programs and applets. If you want
to develop a program, you have to write the code in a text editor and then compile by issuing the adequate command lines in a shell. All IDE have to be compliant with the API (classes
and their methods) as defined by SUN in the JDK. This guarantees that you can run the
programs/applets in all virtual machine that follow the standard. The "old" API was defined
by JDK 1.0.2 and the "new one" by JDK 1.1. Programs written with JDK 1.1 and that use
classes or methods defined since JDK 1.1 (i.e. that were not part of JDK 1.0.2) will not
run on a JDK 1.0.2 compliant VM. However, programs written with a JDK 1.0.2 compliant
environment will still continue to run on a JDK 1.1 VM (JDK 1.1 is a superset of JDK 1.0.2).
So, what is important with an IDE is to know what version of the JDK it supports. This should be indicated in the manual of your version of VJ++. You should be warned about the fact that
Microsoft has been condamned because it introduces classes and methods that were not
part of the Java specification. It will have to remove the Java logo from its products.
Bill Gates does not like the multi-platform nature of Java because its platform is dominating
the market.

What's a VM?

Instead of generating code that is specific to a machine architecture and OS, the Java
compiler creates what is called a "byte code". It is like assembling but for a machine that
does not exist. The aim of the VM is to translate the byte code into code that is understood
by the machine that runs it. That's no more than a kind interpreter.

Why does a Java app./applet run on any platform?

Because a lot of constructors have agreed to port the Java VM for their specific machine, so
that the byte code can be understood by it.

What you need to install.

For an application, the user needs a Java VM. SUN is providing one for Win 95/NT and
Solaris. All the big companies such as HP, DEC, etc. are providing a version as well, for
their specific machine. More and more, the VM is integrated into the OS. In this case, you
have nothing to install. I think that NT has a built in VM. However, I personally prefer to
use the reference: the free VM of JavaSoft, the Java division of SUN (http://www.javasoft.com).
For the applets, the browsers use a VM that is integrated in their system.
LVL 16

Expert Comment

ID: 1223630
P.P.S. as you may anticipate from the above description, it is also not quite true that any Java applet or application will run on any JVM. There is, of course, just as with browsers, the potential for version problems. Specifically, a Java program written based on a particular JDK (we currently have 1.0.2 and 1.1. Version 1.2 is in beta), will run on any JVM of that version or higher. Just like web pages can be plain vanilla (that any browser will interpret) or use the latest DHTML or CCS or Java applets (which you can only view with a sufficiently recent browser), a Java application or applet needs a JVM of the right version or "better".

There is also the matter of JDK. If you use "100% pure Java", it will run on any JVM (of the right version or better), but if you use any of the extensions (the Microsoft extensions I mentioned at the beginning for example), it will only run on JVM's that implement those extensions. (This is the issue of the war between Sun and Microsoft).


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question