RedHat7搭建JAVA开发环境
安装JAVA
# yum install java
安装Tomcat
# yum install tomcat
确认Tomcat版本
# tomcat version
下载并解压Eclipse
# wget http://mirrors.neusoft.edu.cn/eclipse/technology/epp/downloads/release/mars/1/eclipse-jee-mars-1-linux-gtk-x86_64.tar.gz
# tar -zxf eclipse-jee-mars--linux-gtk-x86_64.tar.gz -C /opt
添加菜单项
# vi /usr/share/applications/eclipse.desktop
[Desktop Entry]
Encoding=UTF-
Name=Eclipse 4.5.
Comment=Eclipse Mars
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=
配置Eclipse
打开程序
配置Http Server (因为我先前装的tomcat是7.0,所以选择Tomcat v7.0 Server)
填写Tomcat安装目录,点击Finish
设置文件默认编码
依次点击 Window -> Preferences -> Web ,设置JSP文件编码为UTF-8
Windows7搭建JAVA开发环境
下载并安装Java安装包
JDK下载路径:http://download.oracle.com/otn-pub/java/jdk/8u66-b18/jdk-8u66-windows-x64.exe
下载并安装Tomcat安装包
Tomcat8下载路径:http://mirrors.noc.im/apache/tomcat/tomcat-8/v8.0.30/bin/apache-tomcat-8.0.30.exe
下载并配置Eclipse
Eclipse for Java EE下载路径:http://mirrors.neusoft.edu.cn/eclipse/technology/epp/downloads/release/mars/1/eclipse-jee-mars-1-win32-x86_64.zip
解压eclipse,运行eclipse.exe
点击最下方“Servers”里的create a new server...,弹出定义新服务器窗口,选择Tomcat v8.0 Server,点击Next
填写Tomcat8安装目录,点击Finish
设置JSP文件编码为UTF-8
创建一个Demo工程
填写Project name,选择Target runtime为"Apache Tomcat v8.0",点击Finish
在demo/WebContent下创建demo.jsp
编辑demo.jsp,点击绿色箭头,运行这个页面
Done!
汉化Eclipse
点击Help -> Install New Software...,点击Add...,如下填写Repository,等待列表出来,选取Simplified Chinese,点击Next
接受授权许可,点击Finish
等待语言包安装完成
修改启动程序属性,加上-nl zh
汉化完成。