1. java ee sdk 最新版下载地址
Java EE软件开发包(Software Development Kit, SDK)
http://www.oracle.com/technetwork/java/javaee/downloads/index.html
Java Platform, Enterprise Edition 7 SDK (with JDK 7u40)
http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-7-sdk-update1-2025644.html
2. 下载对应的jdk
比如上面下载的是 Java Platform, Enterprise Edition 7 SDK (with JDK 7u40)
那就要下载对应的jdk 7u40
java历史版本
注意要下载32位的
JDK with NetBeans
http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html
3.安装java ee 7
http://www.cncrk.com/edu/3355_1.html
正在执行必需的配置
_________
正在创建域
_____
正在执行命令:D:\Tools\java\java-ee\glassfish4\glassfish\bin\asadmin.bat --user admin --passwordfile - create-domain --template=D:\Tools\java\java-ee\glassfish4/glassfish/common/templates/gf/appserver-domain.jar --savelogin --checkports=false --adminport 4848 --instanceport 8080 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1
D:\Tools\java\java-ee\glassfish4\glassfish\bin\asadmin.bat --user admin --passwordfile - create-domain --template=D:\Tools\java\java-ee\glassfish4/glassfish/common/templates/gf/appserver-domain.jar --savelogin --checkports=false --adminport 4848 --instanceport 8080 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1 Using port 4848 for Admin.
Using port 8080 for HTTP Instance.
Using port 7676 for JMS.
Using port 3700 for IIOP.
Using port 8181 for HTTP_SSL.
Using port 3820 for IIOP_SSL.
Using port 3920 for IIOP_MUTUALAUTH.
Using port 8686 for JMX_ADMIN.
Using default port 6666 for OSGI_SHELL.
Using default port 9009 for JAVA_DEBUGGER.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=liuxiang,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=liuxiang-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Domain domain1 created.
Domain domain1 admin port is 4848.
Domain domain1 allows admin login as user "admin" with no password.
Login information relevant to admin user name [admin]
for this domain [domain1] stored at
[C:\Users\liuxiang\.gfclient\pass] successfully.
Make sure that this file remains protected.
Information stored in this file will be used by
administration commands to manage this domain.
Command create-domain executed successfully.
启动域
___
正在执行命令:D:\Tools\java\java-ee\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
D:\Tools\java\java-ee\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....
有关该会话 (包括使用该安装的后续步骤) 的概览, 请参阅详细概要报告。有关详细信息, 请参阅日志文件。
后续步骤 http://glassfish.java.net/docs/4.0/quick-start-guide.pdf
详细概要报告 file:///C:/Users/liuxiang/AppData/Local/Temp/2018-02-23-16-16-install-summary.html
将以下目录加入Path
D:\Tools\java\java-ee\glassfish4\bin (GlasshFish目录)
D:\Tools\java\java-ee\glassfish4\glassfish\bin (GlasshFish服务器目录)
4. 相关文档
Java EE 8 Tutorial
https://javaee.github.io/tutorial/
源代码下载
https://github.com/javaee/tutorial/releases
在线api
https://docs.oracle.com/javaee/7/api/
https://javaee.github.io/javaee-spec/javadocs/
下载chm格式
http://file3.data.weipan.cn.wscdns.com/54863326/69296dc6dede824e2bf3dab6d3b89c62d220550b?ip=1519361116,112.86.120.178&ssig=XU3Kh06ddQ&Expires=1519361716&KID=sae,l30zoo1wmz&fn=JavaEE7-api.chm&skiprd=2&se_ip_debug=112.86.120.178&corp=2&from=1221134
html格式
在下载的SDK中\docs\api\javaee-full
java语言指导
https://docs.oracle.com/javase/tutorial/
GlassFish
https://javaee.github.io/glassfish/documentation
5. 下载NetBeans IDE
https://netbeans.org/downloads/
(1) 设置代码补全
qweryuioplkjhgfdsazxcvbnm
(2) NetBeans添加GlassFish服务器
启动服务器
http://localhost:4848/ 管理界面(控制台)
http://localhost:8080/ 服务器界面
停止服务器
(3) myeclipse添加GlassFish服务器
xml中1字节的UTF-8序列的字节1无效([字符编码]Invalid byte 1 of 1-byte UTF-8 sequence终极解决方案)
第一,可以直接在XML文件中更改UTF-8为GBK或GB2312
<?xml version="1.0" encoding="GB2312"?>
第二,可以在Eclipse中更改,在 eclipse 的功能表 [Project]→[Properties],點選 [Resources],在右邊的「Text file encoding」,把原來是系統預設的編碼,改為 「UTF-8」。
把xml的encoding属性值UTF-8改为UTF8
<?xml version="1.0" encoding="UTF8"?>
http://blog.csdn.net/myjlvzlp/article/details/8009885
6. 查看端口调用
netstat -aon|findstr "端口"
查出pid后
tasklist|findstr pid
7. 使用 Java DB (Derby) 数据库
https://netbeans.org/kb/docs/ide/java-db_zh_CN.html
8.新建ee项目
(1) Dynamic Web Module 3.0 requires Java 1.6 or newer.
(2) 建立关联
echo "# ee" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/xxx/ee.git
git push -u origin master
(3) .gitignore
*.class
/target/
(4) 布局
# ee
pom.xml Maven构建文件
/src/main/java Java源文件
/src/main/resource 模块配置文件
/src/main/webapp Web页面,样式表,标记文件,图片(仅限Web应用)
/src/main/webapp/WEB-INF WEb应用的配置文件