Is there a difference between a package and a folder in eclipse?
for example, if I have this hierarchy requirement:
java –classpath C:\ChatCompany\BackendChatServer\
-Djava.security.policy=c:\HW2\permissions.policy
hw2.chat.backend.main.ChatBackendServer
when the package’s name is:
hw2.chat.backend.main
, and “ChatCompany\BackendChatServer\” is the folder name.
Then how can I make this separation between a package and a folder in eclipse, so that I can write:
package hw2.chat.backend.main;
, and not “package ChatCompany.BackendChatServer.hw2.chat.backend.main“?
thanks
You need to:
.eclipseand.classpathare actually created) will be atC:\ChatCompanyfor instance.BackendChatServerthe source folder, under which all sub-directories likehw2will be created as part of the package path of a Java class.That way:
package hw2.chat.backend.main“C:\ChatCompany\BackendChatServer\“