I've started studying java using the tutorial on Oracle. I've been making a program as I've gone along in the tutorial, adding what I learn to the program. When I reached the packages section, I tried packaging my program. However, after I set up the package, my files couldn't find each other. After a couple frustrating hours of trying to fix it, I made a simple package with the following files:
C:\Users\Kenny\ Desktop\testpac kage\TestSuperC lass.java:
C:\Users\Kenny\ Desktop\testpac kage\TestSubCla ss.java (ignore the space)
I can compile TestSuperClass. java, but when I compile TestSubClass.ja va, I get the following error:
I've set up the appropriate folders for the package and set the directory to my classpath. I've been trying to figure this out all day. Can someone explain to me what I'm doing wrong?
C:\Users\Kenny\ Desktop\testpac kage\TestSuperC lass.java:
Code:
package testpackage;
public class TestSuperClass {
}
Code:
package testpackage;
public class TestSubClass extends TestSuperClass {
}
Code:
TestSubClass.java:2: cannot find symbol
symbol: class TestSuperClass
public class TestSubClass extends TestSuperClass {
^
Comment