Package Compilation problem

Hi All,

I am new to java. i am facing problem in compiling and using package. currently i am trying to make a package named "DbConnection" and inside this folder i have made a class namely "MyConnection".

if i use javac command and conpile the source file it will generate a .class file.

but if i am trying to import this package to some other file it is giving an error.

can any body help me in this regard..

Thanks in advance

[466 byte] By [umesh_awasthia] at [2007-11-26 16:08:33]
# 1
Please post a code sample showing how you try to import the other package's classes.
hunter9000a at 2007-7-8 22:30:55 > top of Java-index,Java Essentials,Java Programming...
# 2

> but if i am trying to import this package to some

> other file it is giving an error.

if you've got a class

package a.b

public class c {}

you reference it like

a.b.c myVar =...

and you import it by creating a directory structure like

c:\a\b

where c is in b, and then you put c:\ on the classpath

tjacobs01a at 2007-7-8 22:30:55 > top of Java-index,Java Essentials,Java Programming...