Java目录错误
我得到以下错误Java目录错误,java,class,Java,Class,我得到以下错误 javac MyCollection.java ./au/edu/uow/Collection/CollectionFactory.java:109: cannot access au.edu.uow.Collection.DVDAlbum bad class file: ./au/edu/uow/Collection/DVDAlbum.java file does not contain class au.edu.uow.Collection.DVDAlbum Please
javac MyCollection.java ./au/edu/uow/Collection/CollectionFactory.java:109:
cannot access au.edu.uow.Collection.DVDAlbum
bad class file: ./au/edu/uow/Collection/DVDAlbum.java
file does not contain class au.edu.uow.Collection.DVDAlbum
Please remove or make sure it appears in the correct subdirectory of the classpath.
DVDAlbum dvd = new DVDAlbum(tempTitle,tempGenre, tempDirector, tempPlot);
从下面的代码
package au.edu.uow.Collection;
import java.util.ArrayList;
import java.io.*;
public class CollectionFactory{
DVDAlbum dvd = new DVDAlbum(tempTitle,tempGenre, tempDirector, tempPlot);
}
这是DVD相册的实现
import au.edu.uow.Collection.Album;
public class DVDAlbum implements Album{
private String Title;
private String Genre;
private String Director;
private String Plot;
private String MediaType;
public DVDAlbum(String TempTitle, String TempGenre, String TempDirector, String TempPlot){
Title = TempTitle;
Genre = TempGenre;
Director = TempDirector;
Plot = TempPlot;
}
String getMediaType(){
return MediaType;
}
String getTitle(){
return Title;
}
String getGenre(){
return Genre;
}
}
非常感谢您提供的任何帮助您的
DVD相册
似乎没有任何软件包声明。加:
package au.edu.uow.Collection;
太谢谢你了哈哈我早该知道的