Importing java.io? [message #530862] |
Sat, 01 May 2010 21:14  |
Eclipse User |
|
|
|
I'm new at Java, and I'm currently trying to learn how to write a Trivia game in Java. One issue I'm running into is not be able to locate where to download the java.io package so that I can import it into Eclipse. The error I get in the console after running my code is:
Quote: | at java.io.FileInputStream.<init>(Unknown Source
|
Thanks in Advance.
[Updated on: Sat, 01 May 2010 21:15] by Moderator
|
|
|
|
Re: Importing java.io? [message #531194 is a reply to message #530862] |
Tue, 04 May 2010 03:03   |
Eclipse User |
|
|
|
"Matt H" <skizzatf@gmail.com> wrote in message
news:hrijm7$9cj$1@build.eclipse.org...
> I'm new at Java, and I'm currently trying to learn how to write a Trivia
> game in Java. One issue I'm running into is not be able to locate where
> to download the java.io package so that I can import it into Eclipse. The
> error I get in the console after running my code is:
>
> [quote]at java.io.FileInputStream.<init>(Unknown Source[/url]
>
> Thanks in Advance.
java.io, as well as all the other "java.*" packages, is included in the
default Java runtime library; so you already have it.
But that error looks more like the first line of an exception stack, that
is, of the stack of function calls that formed the call context at a time
when an exception was generated. Is that the only line of output you got,
or is there more?
Also: that "Unknown source" probably means that you have pointed Eclipse to
a JRE, rather than a full JDK, in the Java preferences. The JDK includes
source for the libraries. (JRE stands for "Java Runtime Environment" and is
the bare minimum you need to *run* a Java program. JDK stands for "Java
Development Kit" and includes source code, development tools, and so forth.)
You might need to install a JDK, if you haven't done so already; you can
download it from Sun for free.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03411 seconds