I have a program with two classes (CRAccess and CRWelcome). These classes are in two separate packages. As shown below, CRWelcome has a method called getCRAccess().
public class CRAccess { } public class CRWelcome {
When this method is called, the following error occurs: java.lang.NoClassDefFoundError: CRAccess However, the class CRAccess does exist in the package COM.ibm.mdtom.crescomm. I'm interested in what might be causing this error. Thanks very much.
chi Lin
Ranch Hand
Joined: Aug 24, 2001
Posts: 348
posted
0
Have you include the com.ibm.mdtom.crescomm into the CLASSPATH variable ?
not so smart guy still curious to learn new stuff every now and then
Robbie kyodo
Ranch Hand
Joined: May 05, 2003
Posts: 97
posted
0
did u do a proper import com.ibm.....?
SCJP 2 1.4
Ryan Wilson
Ranch Hand
Joined: Apr 16, 2003
Posts: 64
posted
0
Robbie if he is using the fully qualified path, would he have to do the import? After all imports are just a shortcut for using the full path.
jioy uilo
Greenhorn
Joined: Mar 29, 2003
Posts: 25
posted
0
think you still need to import, like : package a.b.c; class k {}
another file import a.b.c.k;
Ryan Wilson
Ranch Hand
Joined: Apr 16, 2003
Posts: 64
posted
0
What I was trying to say is that you can do it 2 ways.
He can do this
Or he could do it this way
It looks like Michael is using the fully qualified path so he should not have to use an import statement.