Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Importing java.io?
Importing java.io? [message #530862] Sat, 01 May 2010 21:14 Go to next message
Eclipse UserFriend
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 #531085 is a reply to message #530862] Mon, 03 May 2010 12:25 Go to previous messageGo to next message
Eclipse UserFriend
If you have a JRE installed with source attached to it, it should be straight forward.

Look at the way your JRE is installed inside the IDE. Check:
Preferences>Java>Installed JREs.

HTH,

Olivier
Re: Importing java.io? [message #531194 is a reply to message #530862] Tue, 04 May 2010 03:03 Go to previous messageGo to next message
Eclipse UserFriend
"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.
Re: Importing java.io? [message #531441 is a reply to message #531194] Tue, 04 May 2010 18:09 Go to previous message
Eclipse UserFriend
I believe I have JDK. I'm currently installing several plug-ins, so hopefully some good will come of that.

Thanks again for the help.

Previous Topic:remote debugger customization
Next Topic:Start pull up refactoring over API
Goto Forum:
  


Current Time: Tue Apr 15 02:56:14 EDT 2025

Powered by FUDForum. Page generated in 0.04160 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top