FAQ: JAVA-Win '95 VER: 1.04 (11MAR96) LOC: http://www-net.com/java/faq/faq-java-win95.txt Written by D'Arcy Smith (dsh@unix.infoserve.net) Mar 11th 1996. Please e-mail me corrections/improvements/suggestions. TOC --- 0. Leagal Stuff 1. Revision History 2. Frequently Asked Questions "Java and HotJava are trademarks of Sun Microsystems, Inc., and refer to Sun's Java programming language and HotJava browser technologies. Comp.Lang.Java.FAQ is not sponsored by or affiliated with SUn Microsystems, Inc." You are free to distribute this FAQ as long as this section is distributed "as is" along with it. Please direct any questions to me (D'Arcy Smith) @ dsh@unix.infoserve.net 1. Revision History ------------------- 1.0.0 (Jan 3 1996) - Created. 1.0.1 (Jan 16 1996) - Minor formatting changes. - Addition of Sections. - Fixed CLASSPATH error. - Added Case Sensitivity. 1.0.2 (Feb 1 1996) - Monor formatting changes. 1.0.3 (Feb 23 1996) - Fixed CLASSPATH. 1.0.4 (Mar 11 1996) - Revisionary history on the version numbers. - Added HOMEDRIVE & HOMEPATH & remove HOME. 2. Frequently Asked Questions ----------------------------- The Questions: 1. How do I setup the JDK for Sun? 2. I don't have any buttons on the copyright notice? 3. How do I get rid of the appletviewer copyright notice screen? 4. I've got a .zip file that I got from Sun ... but pkzip won't handle the long filenames ... what can I do? 5. Whenever I try to use the appletviewer it just sits there... or it askes me to dial out to the internet - how do I stop this? 6. When I try to compile something javac tells me that "class x must be defined in a file called X.java" - how do I compile it? The Answers: 1. How do I setup the JDK for Sun? ---------------------------------- a) add to you java directory a home directory (cd java; md home) (you don't need to call it home!) b) in your AUTOEXEC.BAT a) add java\bin to your path. (PATH=...;C:\java\bin;) b) add SET HOMEDRIVE=C: c) add SET HOMEPATH=\(where ever your .hotjava directory is) (HOMEPATH=\java) d) add SET CLASSPATH=.;C:\java\lib\classes.zip;C:\(wherever you want to store your classes); c) reboot (so changes take effect) d) goto the C:\JAVA\DEMO\Animator e) at the command line type: appletviewer example1.html A copyright window will come up - select the Accept button (but read the document first!) You should have a little window with a little guy waving at you!) The little guy is Duke and he's not a tooth! 2. I don't have any buttons on the copyright notice? ---------------------------------------------------- Yes you do! If you can't see them ... then they are hiding behind the task bar - move the window up. 3. How do I get rid of the appletviewer copyright notice screen? ---------------------------------------------------------------- Go to the DOS prompt (a DOS Window not booting into DOS mode). Change to the java\home directory. Type "md .hotjava" The next time you run the appletviewer you'll have to "accept" but after that it'll be gone. 4. I've got a .zip file that I got from Sun ... but pkzip won't handle the long filenames ... what can I do? -------------------------------------------------------------------------- i) Your "unzipper" might not support Long File Names to www.winzip.com and get the 32-bit version of Winzip. ii) You might not have Lonmg File Name support turned on. Go to the Control Panel (under the "Start" menu). Select System | Performance | File System | Troubleshooting. Make sure the "Disable Long Filename..." is not checked. 5. Whenever I try to use the appletviewer it just sits there... or it askes me to dial out to the internet - how do I stop this? ------------------------------------------------------------------ according to Rich Fritzson (sorry lost the e-mail address) "First disable DNS in your TCP configuration: Select Control Panel, Select Network, Select TCP/IP, Select DNS tab and disable DNS. Then reenable DNS by selecting the properties window of your dial-up networking icon, selecting TCP/IP properties and enabling DNS there." 6. When I try to compile something javac tells me that "class x must be defined in a file called X.java" - how do I compile it? -------------------------------------------------------------------- javac is Case Sensitive. If you have a class like: public class X { /*...*/ } to compile it you must execute javac like: javac X.java // javac x.java would look for a class called 'x'! ----------------------------------------------------------------------------