[java] Java Beginner

Started by
2 comments, last by Dee 23 years, 10 months ago
I decided to learn java, but my first program has an unsolvable error and i''m all lost... not to mention a mental breakdown... import java.awt.*; import hsa.Console; they say that hsa.Console is unaccessible... so there''s an error with that line.. but i got it straight from a text book.. help
Advertisement
Hello. Did you get a CD with your textbook? If so then you need to copy the directory hsa to a more permanent (from the perspective that you might want to use the CD-ROM drive for something else not to denote that a hard drive is more permanent then a CD-ROM drive ) place. When you go to compile your class files you need to type in the following


javac -classpath $ABSOLUTE_PATH_OF_THE_HSA_DIRECTORY yourFile.java


That should work. If your copy didn''t come with a CD check to see if there''s a URL or FTP site where you can download the hsa package. Follow the same directions as above.


joeG
joeG
the line
import hsa.Console

means that your program needs a class ''Console'' from a package ''hsa''. This package and class are not standard with a java developer''s kit distrobution, like joeG said, they are probably on a CD somewhere that you got with your book. Packages translate to directory sturcture, so a package of book.specialized.hsa would be a directory structure of
book \
specialized \
hsa
Then you would find Console.java or Console.class in there.
haha, i thought it was part of the JDK, but i got it fixed...
but now... another problem..

Does anyone know Visual Age for Java

This topic is closed to new replies.

Advertisement