Where is "package com.macfaq.io" - help

Where is the "package com.macfac.io"? is it included with jdk1.5.0.06? If not where and how does one get in installed?

I have downloaded and installed jdk1.5.0.06. I am trying to compile a class that starts as follows:

package com.macfaq.io

Import java.io.*

public class SafeBufferedReader extends BufferedReader {

public SafeBufferedReader(Reader in) {

this(in, 1024);

}

etc.

another class has the following line:

import com.macfaq.io.SafeBufferedReader;

later in program an object is created new ....

It does not compile because it says that the package is not defined. I have looked in C:\Program Files\java\jdk1.5.0.06\bin, lib and have not found anything with "com.macfaq" name. But I haven't found anything with the name "java.io" either and it doesn't complain about it.

Thanks

[871 byte] By [jhka] at [2007-10-2 9:12:00]
# 1
hai,your first program is the package crerator.second one is using that package .compile ur first program like javac -d . XX.javaand then try to run second one
PranavIndiaa at 2007-7-16 23:19:04 > top of Java-index,Java Essentials,New To Java...
# 2

> Where is the "package com.macfac.io"? is it included

> with jdk1.5.0.06? If not where and how does one get

> in installed?

It is not in the standard JDK. Download the com.macfac package here: ftp://metalab.unc.edu/pub/languages/java/javafaq/javaio.jar

Put the JAR file in your classpath, and you'll be able to import classes from it.

Good luck.

prometheuzza at 2007-7-16 23:19:04 > top of Java-index,Java Essentials,New To Java...
# 3
> package com.macfaq.ioYou actually have to put the class file you're compiling into that package directory. It's not enough to simply declare that it will be inside it. It has to actually be there.
CeciNEstPasUnProgrammeura at 2007-7-16 23:19:04 > top of Java-index,Java Essentials,New To Java...
# 4

Thank you all for your help. I created the package and included in my path and the application compiled and ran.

I have a lot to learn... for some application that import java.io* do not require javaio.jar to be in the lib directory. How and when do I need a separate jar (javaio.jar) such that I can successfully import java.net, java.util, etc.

jhka at 2007-7-16 23:19:04 > top of Java-index,Java Essentials,New To Java...
# 5

> I have a lot to learn... for some application that

> import java.io* do not require javaio.jar to be in

> the lib directory. How and when do I need a separate

> jar (javaio.jar) such that I can successfully import

> java.net, java.util, etc.

java-, javax- and some org-packages are provided with a standard JDK installation. Other 3rd party packages you'll have to download and include in your classpath like you did with the javaio.jar file.

Here's a link to all the "standard" packages/classes: http://java.sun.com/j2se/1.5.0/docs/api/

Good luck.

prometheuzza at 2007-7-16 23:19:04 > top of Java-index,Java Essentials,New To Java...
# 6
Tip: Learn to use Google. Google is your friend.[url http://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=package+com%2Emacfaq%2Eio]Click here[/url] for an example.
Dick_Adamsa at 2007-7-16 23:19:04 > top of Java-index,Java Essentials,New To Java...
# 7

> Tip: Learn to use Google. Google is your friend.

>

> [url

> http://www.google.com/search?sourceid=navclient&ie=UTF

> -8&oe=UTF-8&q=package+com%2Emacfaq%2Eio]Click

> here[/url] for an example.

Tip: Stop posting these tips.

kajbja at 2007-7-16 23:19:04 > top of Java-index,Java Essentials,New To Java...
# 8
Thanks again for you help. My application is now running.
jhka at 2007-7-16 23:19:04 > top of Java-index,Java Essentials,New To Java...