-
Class does not compile when in different folder
I have classes in this directory structure:
C:\portalbean\portal
All classes in this folder are package as so:
package portal;
class PortalTest implements PortalReadWrite
{
...
}
I have tested the application on the command prompt as so:
C:\portalbean>java portal.PortalTest
This Works.
My problem is that I now want to move the PortalTest.java file to a folder called TestDrivers. This is because I want to have PortalTest2.java ...PortalTestN.java
So thus now PortalTest2.java is in a folder called:
C:\portalbean\portal\TestDrivers
import portal.*; //note this is the only line I have changed
class PortalTest2 implements PortalReadWrite
{
...
}
However the class does not compile. Gives errors such as:
C:\portalbean\portal>cd TestDrivers
C:\portalbean\portal\TestDrivers>javac *.java
PortalTest1.java:1: package portal does not exist
import portal.*;
^
PortalTest1.java:17: cannot resolve symbol
symbol : class PortalReadWrite
location: class PortalFtpTest
class PortalTest1 implements PortalReadWrite
^
PortalTest1.java:19: cannot resolve symbol
symbol : class PortalFtp
location: class PortalTest1
PortalFtp ftp;
^
PortalTest1.java:25: cannot resolve symbol
symbol : class PortalFtp
location: class PortalTest1
ftp = new PortalFtp();
^
Please help,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks