Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每当我尝试启动我的代码时,Eclipse 都会给我错误“选择不包含主要类型”这是我的代码:
public class main { /** * @param args */ public static void main(String[] args) { System.out.println("Hello World!"); } }
这是项目树:
评论:
该文件从 Eclipse 的运行类型中排除,因为它存在于源文件夹之外。创建一个新的源文件夹src/main/java并将文件移动到那里。
src/main/java
以下是 Eclipse 的基本项目源文件夹:
src/main/resources
src/test/java
src/test/resources
我认为我已经习惯了关于项目中 PHP 声明的相当自由的政策 - 我一直只是使用:
<? // here is my php code ?>
我只是在 FastCGI 下使用 PHP-FPM 设置了一个 nginx 服务器,现在它需要我明确声明:
<?php // here is my php code ?&