[英]Eclipse/Java: adding a .css file to default package
I have just added a .css
file to the default package
(right-click over default package
> New..) in a plain Java project, but as you can see below, the file ( NewFile.css
) is outside the package.. why? 我刚刚在纯Java项目中将.css
文件添加到default package
(在default package
单击鼠标右键> New ..),但是正如您在下面看到的,文件( NewFile.css
)在程序包之外 。为什么?
This is some strange for me, since I don't have any problem to add a new .css
file to a JavaFX application as you can see here ( applications.css
): 这对我来说有些奇怪,因为我没有任何问题将新的.css
文件添加到JavaFX应用程序,如您在此处看到的( applications.css
):
Packages are created to hold only java files. 包被创建为仅包含Java文件。 You can create new source folder say resources
in the project level and add .css files there. 您可以在项目级别创建新的源文件夹,例如resources
,并在其中添加.css文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.