문제

I have a package named "smartApp" which further contains a TDA.java file and a sub package named "Crawler" . I am trying to access a .java file (defined in crawler package) in TDA.java.I also import Crawler package in TDA.java file as "import Crawler.*;" but it says "error: package Crawler does not exist" .

My hierarchy is as follows: SmartApp-->TDA.java , Crawler -->ABC.java

도움이 되었습니까?

해결책

It has to be:

import smartApp.Crawler.*;

Note that package names should follow the Java Naming Conventions. They shouldn't start with capital letters.

다른 팁

// Rename Crawler to smartApp.Crawler

import smartApp.Crawler.*;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top