Solved

New To Java Environment

Posted on 1998-06-24
4
181 Views
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.

Thanks
0
Comment
Question by:mtgcpc
[X]
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
4 Comments
 
LVL 16

Accepted Solution

by:
imladris earned 70 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.

0
 
LVL 16

Expert Comment

by:imladris
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).

0
 
LVL 5

Expert Comment

by:fontaine
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.
0
 
LVL 16

Expert Comment

by:imladris
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).

0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

734 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