X() is not public in Y.X; cannot be accessed from outside package
807603Feb 1 2008 — edited Feb 6 2008Well, I'm stumped. And so is my coworker, who has a lot more experience with Java and Netbeans than me. If any of you have any ideas as to what I'm doing wrong here, I'd be most grateful. :)
---
Compiling 5 source files to /home/meme/UploadGUI/UploadGUI/build/classes
/home/meme/UploadGUI/UploadGUI/src/interfaces/UploadUI.java:1522: ExploreDirectoryNew(java.lang.String) is not public in backend.ExploreDirectoryNew; cannot be accessed from outside package
ExploreDirectoryNew handle = new ExploreDirectoryNew("/home/meme/SampleDicomDir/");
---
The project has two packages, "backend" and "interfaces". interfaces/UploadUI.java imports everything from backend:
---
package interfaces;
import com.pixelmed.dicom.*;
import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import org.jdom.*;
import org.jdom.output.XMLOutputter;
import org.jdom.input.SAXBuilder;
import backend.*;
---
backend/ExploreDirectoryNew starts out like this:
---
package backend;
import java.io.*; // file handling
/**
*
* @author eunyokim
*/
public class ExploreDirectoryNew {
private File in_file; //for input file/directory
private int no_of_files=0;
private String[] file_list=new String[2000];
//private String[] content_list=new String[500];
ExploreDirectoryNew(String input){
...
---
That sure looks public to me. If anyone can tell what I'm doing wrong, I'd be most appreciative!