现在的位置: 首页 > 综合 > 正文

petstore is build in netbeans

2013年07月14日 ⁄ 综合 ⁄ 共 1691字 ⁄ 字号 评论关闭

目前一直使用快速开发工具X3(justep公司用delphi开发的studio)做项目(一年了,2个项目),对delphi语言也不甚理解。突然有一天公司开始使用java开发平台了,才发觉自己对java陌生了,虽然也看了 thinking in java。这几天从java.sun.com上下了个netbeasIDE和Petstore 5,想学习一下java项目的构架、过程、原理和使用的相关技术,呵呵(O(∩_∩)O~),搞ta们俩了好几天都没有ok,这也难怪,和别人还不怎么认识就想free搞,有点难了吧。不过,还是通过sun Forums、googling和自己的项目经验的理解,最终给运行起来了。      这里借用csdn免费给的‘内存’,来记忆一下搞ta们的步骤吧。(抄袭了一下javaEye论坛的相关知识和一个不认识的英文网站上的资料,自己英文很差,但是love English,凑合着看吧)。CS:"OK,Let's go."     

step 1:download netBeans IDE, Petstore,installing

step 2:Locate the file build.properties found in C:/javapetstore-2.0-ea5/bp-project/ and open it with a text editor to make the following changes.

---Change javaee.home from:
javaee.home=c:/Sun/SDK
to
javaee.home=C:/glassfish-v2

---Change javaee.server.passwordfile from:
javaee.server.passwordfile=${javaee.home}/samples/bp-project/passwordfile
to
javaee.server.passwordfile= C:/javapetstore-2.0-ea5/bp-project/passwordfile

---In the C:/javapetstore-2.0-ea5/bp-project folder create a file called passwordfile (no extension).In this file add the following line:
AS_ADMIN_PASSWORD=adminadmin

step 3:Locate the file app-server.properties

 javaee.home=c:/Sun/SDK    改为    javaee.home=D:/glassfish   (D:/glassfish服务器安装目录)

step 4:--Start NetBeans and open the project javapetstore-2.0-ea5 that you will find when you browse to C:/javapetstore-2.0-ea5.

--Start the GlassFish server. In NetBeans select Window and then Services. A new panel replaces the Projects panel and displays all the services available. Select Servers, right mouse click on Glassfish, and select Start.

--In NetBeans return to the Projects panel in the petstore project, go to the Server Resources folder of the project, right mouse click on setup.xml, select Run Target, and select setup. This should create the necessary database files and register them with the persistence engine of GlassFish.

--Now Run the main project

抱歉!评论已关闭.