This collection of frequently asked questions (FAQ) provides brief answers to many common questions about the Sun Java Platform, programming language, and the Java 2 Platform. It also provides links to more detailed information available from this web site. Please check here for answers before posting a question to one of the Java technology-related newsgroups or before sending email to any of the addresses at Java Software e-mail addresses.
A. Getting started with Java:
B. Getting information and staying in touch:
C. Java technology-enabled Netscape:
D. Marketing, licensing, and planning:
A1. What releases of Java technology are currently available? What do they contain?
The Java programming language is currently shipping from Sun Microsystems, Inc. as the Java 2 SDK and Java 2 Runtime Environment. All Sun releases of the Java 2 Platform software are available from the Java 2 Platform software home page.
Each release of the Java 2 SDK, Standard Edition contains:
To run Java 1.0 applets, use Netscape Navigator 3.x or other browsers that support Java applets. To run Java 1.1.x applets, use HotJava 1.x or Netscape Navigator 4.x or other browsers that support the newest version of the Java API.
Sun provides ports of the Java 2 Platform for Windows 95, Windows 98, Windows NT, Windows 2000, Solaris-SPARC, Solaris-Intel, and Linux.
The following applies to versions prior to 1.3.0. Starting with J2SE 1.3.0, only the production release exists. There is no Solaris reference implementation.
Reference Implementation - Those who want the latest Solaris implementation of the JDK software or JRE release and do not require optimized performance can obtain the reference implementations:
Production Release - In contrast, customers whose applications/applets will be released as products, and who need a Solaris JRE or JDK software with optimized performance, should use the Solaris production releases:
Varying levels of technical support are available for both the Reference and Production releases through the standard Solaris support channels.
These are extremely popular and important questions. What we can currently say is:
Amiga, NeXT, OS/2, Windows 3.1, Windows 32s, Macintosh, ...We've provided our source code to make third-party ports like these possible, but we are not officially overseeing or tracking them. For more information, please check out:
You can get our releases either with a World Wide Web (WWW) browser or by anonymous ftp. For details, including installation instructions, visit:
The current version of HotJava browser is 1.1Beta1 and is available at HotJava. This page has links to an email address for comments and to HotJava browser known bugs.
See our page which can guide you in the right direction:A8. Do I need special server software to use applets?
No. Java applets may be served by any HTTP server. On the server side they are handled the same as any other file, such as a text, image, or sound file. All the special action happens when the applet class files are interpreted on the client side by a Java technology-enabled browser, such as HotJava browser or 1.x or Netscape 3.x/4.x.
See our "Who's Licensing Java?" page:
The short answer is that we provide documentation only for the public classes in java.*. We do not provide documentation for sun.* because those are the Sun-specific implementation, and specifically not part of the Java technology API standard, and are therefore subject to change without notice.
In general, we don't provide javadoc documentation for sun.* classes in order to discourage developers from writing programs that use them. For further explanation, see the next question.
However, if you must have it, the documentation for sun.* is available in the doc comments in the community source code release available separately, mentioned in question A14. For example, the doc comments for sun.net are in the source files located at:
/src/share/sun/sun/net/*.javaThis source code release does not include javadoc-generated documentation. You would have to generate those docs yourself using javadoc.
Java Software supports into the future only classes in java.* packages, not sun.* packages. In general, API in sun.* is subject to change at any time without notice. For more details, see the article Why Developers Should Not Write Programs That Call 'sun' Packages.
Java Software has two separate bundles of source code that you can obtain at no charge:
B1. Where did the Java name come from? What does it stand for?
The name was chosen during one of several brainstorming sessions held by the Java software team. We were aiming to come up with a name that evoked the essence of the technology -- liveliness, animation, speed, interactivity, and more. "Java" was chosen from among many, many suggestions. The name is not an acronym, but rather a reminder of that hot, aromatic stuff that many programmers like to drink lots of.
We no longer keep a list of people to inform; when we started that, we never expected that so many people would be writing to us every day! If you'd like to keep informed, the best way is to visit our Web site
periodically and participate in the Java technology-related newsgroups. Note in particular that our "What's New" page:
provides an overview of the most recent developments, press releases, and so on concerning Java technology.
Several newsgroups are currently available, including:
B4. What email addresses are available?
Information about our internal e-mail addresses is available at
We provide a wide range of documentation (white papers, API specifications, programmer's guide, and more), reachable from our documentation page:
Most of our documents are available in HTML, PostScript and PDF formats.
Sorry, but we're mainly set up to distribute information through our Web site ( Java) and ftp site. We want to get as much information out and available as possible, but we can only handle the volume via these customer-initiated mechanisms.
Yes, that's essentially what you're doing when you use our beta release software and send in bug reports. We generally don't have separate formal programs for early-release testing.
SunService is providing Java programming language courses at sites around the world; see
Sun Educational Services (http://www.sun.com/sunservice/suned/)
See instructions on our bug report page:
We will not be able to acknowledge each report individually. Please accept our gratitude in advance -- your feedback is crucial to our work.
Netscape 3.x supports Java 1.0 applets on many but not all platforms. See the release notes for your platform at:
Java technology-enabled versions of Netscape 3.x will only run beta and 1.0.2 applets, which can be written with the 1.0.2 Java Development Kit (JDK). Be aware that there are many Web pages with alpha applets, which Netscape 3.x will not handle. You can distinguish between alpha and beta applets by looking at the html source for a page: alpha applets use the <app> tag, whereas beta applets use the <applet> tag.
Hotjava browser and Java technology-enabled versions of Netscape 4.x will run 1.1.x applets, which can be written in with JDK 1.1.x.
For questions that specifically concern installation, troubleshooting, feature availability, and how to do something specific with applets in the Netscape browser, it's best to ask Netscape directly.
D1. Is Java technology free? Where can I get information on licensing?
The Java Development Kit (JDK) is free to download and use for commercial programming, but not to re-distribute. We have guidelines on our web site for using and/or licensing Java technology; see
Sun does not authorize the use of the Java logo. For more information about this and other special developer logos, please see:
We welcome all input regarding Java technology -- we will read and consider it. We're keeping many more options in mind than appear in our current releases. However, because we are focusing on moving toward our next release, we have time to answer only a small number of such questions. See:
No, we need to let other companies speak for themselves. We can only refer you to official press releases. For pointers to recent press releases, see our "What's New" page:
Java technology is a product of Sun Microsystems, Inc., which is traded on NASDAQ under the symbol SUNW.
E1. Will Java technology work with DOS file name limitations (8.3)?
Java technology relies on files with longer names than the old DOS limits, so if you are running older (pre-Microsoft Windows 95) versions of DOS, Java technology will not work. If you are running a version of DOS (such as the one that comes with Windows 95) that allows long file names, you should not have any problems.
Note that older versions of WinZip do not support long file names, even if the installed version of DOS does. You can get a free upgrade of WinZip with support for long file names from their web site.
The examples in the programmer's guide have been updated to conform to the new applet API in our 1.0.2 Java Development Kit (JDK). "Superclass not found" error messages are typical if you try to compile Java 1.0 beta code with an alpha version of javac. The recommended fix is to download a copy of the JDK software, and do all further development with that.
Another potential source of this error message is incorrect capitalization of either the file name or the class name in in the file. The Java technology system is case-sensitive, so a HelloWorld class is different from a helloWorld class, and so on.
The appletviewer looks for a .hotjava directory inside your home directory to determine whether you are starting it for the first time. If the directory is not found, the appletviewer will pop up the copyright notice. The workaround is to manually create the .hotjava directory in your home directory. The following paragraphs explain how to do this.
The appletviewer is written to recognize three MS-DOS environment variables for the location of a user home directory: it uses either HOME or the combination of HOMEDRIVE and HOMEPATH. Under Windows NT3.51, the HOMEDRIVE and HOMEPATH environment variables are set automatically. Under Windows 95, you will need to set the HOME environment variable to point to an existing directory.
Once your home directory is set, all you need to do for Windows NT3.51 is to create the .hotjava directory inside of it:
In Windows 95, the easiest method is to edit the AUTOEXEC.BAT file, adding the following line:
Then save the file and reboot, so that the change to take effect. Once your computer has rebooted, open a DOS window and execute the following command:
Although your virus checker may have discovered a real virus, you should consider the possibility that a false detection has occurred. Virus-checker programs can mistakenly find "viruses" in parts of the JDK software where there really is no virus. This can happen when the virus checker detects a bit pattern in a class file that, by chance, matches a bit pattern in a virus. The types of viruses that can infect .exe or .com files typically cannot infect class files or jar files.
The problem is probably that your HelloWorld.class file is not on your class path. The class path is the list of one or more directories in which the java application launcher will look for the .class files comprising your application. So, how to specify the class path?
If your program depends only on the J2SE classes, you should not need to use classpath, because those classes are automatically on the classpath. If your program depends on other classes, you need to set classpath to those classes. In that case, it is preferable to use the -classpath option rather than the CLASSPATH environment variable, as the -classpath option enables each application to have its own classpath. For more details, see:
Please send questions to the Compiling forum where others can help you.
The following assumes you're running Windows 95/98/NT/2000.
There is a CLASSPATH environment variable. You can see which environment variables are set on your machine by running 'set' at the DOS prompt. If the CLASSPATH variable is set, then its value is your class path. If the CLASSPATH variable is NOT set, then the default class path is the current directory (i.e. whatever directory you run 'java HelloWorld' from).
So if you are trying to run 'java HelloWorld' from the directory in which the HelloWorld.class file is in, and you get the "can't find" error, it's probably an indication that you have the CLASSPATH environment variable set. Try unsetting the CLASSPATH variable: 'set CLASSPATH=' (i.e. setting it to no value is the same as unsetting it). Then try running your application again. Because the CLASSPATH variable isn't set, the class path should default to the correct directory, and your app should launch.
Altenatively, you could set the CLASSPATH environment variable to point to the location of your HelloWorld.class file. However, you'd run into the same "can't find" error if you then tried to run another application located in another directory.
You can also force the class path to be a particular value by using the -classpath option: 'java -classpath C:\myprograms\ HelloWorld'
See class path information in the Java 2 tools documentation for more information.
A recent update to Microsoft Internet Explorer included a change that alters the way users interact with applets and other interactive content in the browser. With this change, users are first required to manually activate (click on) the applet's user interface, before the user can interact with the content. If the page has multiple interactive components, users are required to activate each user interface individually.
It is possible to get the old behavior back. Microsoft has published a general solution for updating web pages that restores the user experience. For more information, see the Microsoft article Activating ActiveX Controls. Working with Microsoft, Sun has developed an Internet Explorer deployment guide customized for Java developers, which provides examples on how to leverage the Microsoft work around, and minimize user impact of the Internet Explorer update.*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.