构建普通java项目跟构建普通java web项目一样
前面讲解了如果构建maven项目,但是有的同学可能还没有使用maven项目,还是之前的普通java web项目,那如何构建呢
1.构建普通java项目
选中External Libraries
构建完成后是这样的
![]()
2.导入jar包
跟java web项目一样,具体看这里
http://www.19shusheng.com/special/detail/abb2722981#2
3.运行项目
我们src下构建一个Test.java
public class Test {
public static void main(String[] args) {
System.out.println("hello idea");
}
}
然后
会提示这个
Cannot start compilation: the output path is not specified for module "normal-java".
Specify the output path in the Project Structure dialog
其实就是没有配置编译路径,ctrl+alrt+shift+s打开配置界面
![]()
具体可以看这里
http://www.19shusheng.com/special/detail/b082971a86#303
再次运行,就可以成功输出 hello idea了