[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Java servlet and Java applets

Posted on 2001-07-24
3
Medium Priority
?
191 Views
Last Modified: 2013-11-24
what are the advantages that java servlets have over java applets?
"java is platform independent" what does it mean by that?
i heard that it is due to the bytecodes. can you guys please explain on this?
what about C and C++? are they platform independent also?
i am not so sure about C but C++ alot of people say that it is. Please clearify.
thanx alot

0
Comment
Question by:volca
[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
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6315797
> what are the advantages that java servlets have over java applets?

They are really different technologies serving different purposes so you can't really compare them.
Basically applets run on the client (browser).
While servlets run on the server.

> "java is platform independent" what does it mean by that?

That Java byte code will run on any Java enabled platform.
So you can take the same class file and run it on a Windows box, or a Linux box, or a Macintosh, without any need for recompilation.

> i heard that it is due to the bytecodes. can you guys
> please explain on this?

Java byte code (your class files) is run by a Virtual Machine (VM).

> what about C and C++? are they platform independent also?

No, they produce native code to run on a particular platform.

> i am not so sure about C but C++ alot of people say that
> it is. Please clearify.

Say it is what?
0
 
LVL 7

Accepted Solution

by:
tomboshell earned 450 total points
ID: 6316412
>what are the advantages that java servlets have over java applets?
 Applets are embedded into a web page and tend to be simple programs.  They are limited in what they can due on the downloaded machine(client) unless they are 'signed'.  Not all client machines may have the right plug-in or support for the applet.   Servlets run on the server and are intended to enhance the server performance.  One use of Servlets is to present a 'dynamic' web page/pages.  (simple definition) Dynamic in that what will be presented can depend on what info/selections the user makes.  This is good for transactions.  The use of servlets take less time to load than applets (generally) and may not be noticable to the user.  

By platform independant, means that the program will run on any computer that it is loaded onto.  This only depends on the interested machine having the JDK/JRE installed.  These are what enable the java program to run.  One is a development kit, the other is simply a run-time environment.

Byte code is simply how the data is stored.  A byte is 8 bits in size, so the data is stored in chunks of data and will be processed in chunks.

What is different with Java and C/C++ is the virtual machine.  Java has a virtual machine in the JDK/JRE that does the processing.  The program runs in this machine which establishes basically the same enviroment to the Java program irregardless of where it runs.  C/C++ is usually written specifically for a certain platform (operating system).  The other issue that leads to a difference is the Endian order (don't know about the spelling there.)  One system will write its data with the Most Signifigant Bit first, the other will write it the other way.  This would have to be taken into consideration with C.  Java is automatic.  

C/C++ are not platform independant, they may be capable of making similar calls on diffent machines.  The language is the same across many machines since the language has been standardised; however, once compiled on one machines it is optimized for that machine/operating system type.  So, a W98 program does not run on a Linux machine.  But Java does.  :)

Tom
0
 
LVL 7

Expert Comment

by:tomboshell
ID: 6326051
thank you and I hope that it helped.
Tom
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
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

656 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