Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book

Lunch in JavaWorld

After working up an appetite on the slopes, take a lunch break with JavaWorld, an online magazine for Java programmers. Visit www.javaworld.com.

JavaWorld offers how-to articles, news stories, and research centers on hot areas of Java development. One of the advantages of the publication’s web format is that it can display functional Java programs in conjunction with articles. Figure 3.3 shows a Java poetry magnet board that accompanies a tutorial explaining how it is written.

Figure 3.3

Figure 3.3. A JavaWorld how-to article on how to create a poetry magnet board includes a working example of the program.

JavaWorld publishes articles and commentary about the language and its development. One issue that has been hotly debated since Java’s introduction is whether the language is secure.

Security is important because of the way Java programs work when they are placed on a web page. The Java programs you have tried during this hour were downloaded to your computer. When the program was finished downloading, it ran on your computer.

Unless you know a whole lot of people, most web pages you visit are published by strangers. In terms of security, running their programs isn’t a lot different than letting the general public come over and borrow your computer. If the Java language did not have safeguards to prevent abuse, its programs could introduce viruses onto your system, delete files, play the collected works of Justin Bieber, and do other unspeakable things. Java includes several different kinds of security to make sure that its programs are safe when run from web pages.

The main security is provided by restrictions on Java programs running over the Web:

  • No program can open, read, write, or delete files on the user’s system.
  • No program can run other programs on the user’s system.
  • All windows created by the program are identified clearly as Java windows.
  • Programs cannot make connections to websites other than the one from which they came.
  • All programs are verified to make sure that nothing was modified after they were compiled.

Although there are no guarantees, the language has been proven to have enough safeguards to be usable over the Web.

The Java language also offers a more flexible security policy for programs that run in a browser. You can designate some companies and programmers as trusted developers, which enables their Java programs to run in your browser without the restrictions that normally would be in place.

This system of trust is established through the use of signed applets that have digital signatures, files that clearly identify the author of a Java program. These signatures are created in collaboration with independent verification groups such as VeriSign.

If you ever have authorized a program to run in a browser such as Internet Explorer or Google Chrome, you have worked with a similar system of trust and identity verification.

Applets can still be useful today, but over the years other technology, such as Flash, Silverlight, and HTML5, have been employed for web page–based programs. Java is more commonly encountered on mobile apps, server programs, and desktop software.

  • + Share This
  • 🔖 Save To Your Account