Home > Articles

Vacationing in Java

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

Q&A

  1. Can I use the sample Java programs from the Sun Microsystems Web site on my own home page?

  1. Sun encourages the use of its sample programs on Web sites. In addition to the programs available at http://java.sun.com, take a look at the folders that were created when you installed the Software Development Kit on your system. If you installed the demo programs along with the Kit, you will find more than two dozen sample programs along with the .java files that were used to compile them. These programs can be a valuable resource when you're working on your own Java programs later.

  1. What is the difference between Java applets and ActiveX controls?

  1. ActiveX, an extension of Microsoft technology called the Component Object Model, offers support for interactive Web programs that are similar in function to Java programs. They are placed on Web pages and run when browsers are equipped to handle them. The primary differences are that ActiveX relies on a system to verify the identity of ActiveX programmers and ActiveX programs are not downloaded each time they are encountered. Unlike Java programs, an ActiveX program stays on a user's system. Also, an ActiveX program is not restricted in what it can do on a system, while Java programs run from Web pages face very strong restrictions in what they can do.

  1. I ran a useful Java program on a Web page. Can I run it on my system without the browser?

  1. Under most circumstances, no. Java programs typically are developed to run on a Web page or to run from the command line. A program can be written so that it works in both ways, but most of the programs you will find in a directory such as EarthWeb do not include this functionality. You'll learn much more about the different types of Java programs during Hour 4, "Understanding How Java Programs Work."

  1. Is there a print edition of JavaWorld?

  1. JavaWorld is distributed strictly through the World Wide Web. However, several newsstand magazines are available that cover the language, including Java Report, Java Developer's Journal, Dr. Dobb's Journal, and others.

  1. Can a Java program I run on a Web page give my computer a virus?

  1. Because of general security restrictions that prevent Web programs from reading, writing, or modifying files, there's no way for a virus to be transmitted from a Java program on a Web page to your system unless you gave the program full permission to access the hard drive on your system. Java programs you download and run from the command line have the same risk of viruses as any program you download. If you're using programs received over the Internet, you need to acquire a good antivirus program and use it regularly.

  • + Share This
  • 🔖 Save To Your Account