Sun PetStore

http://www.omniprogrammer.com/?p=4

 

Sun PetStore安装参考

我的操作:

 

第一步下载:javapetstore-2.0-ea5-installer.jar 【不同版本不同】

 

第二步:双击解开上述jar,放到一个目录下,比如:我放置于D盘 D:\javapetstore-2.0-ea5

 

第三步:修改:D:\javapetstore-2.0-ea5\bp-project 下的build.properties 文件

 

# path to your application server installation

#javaee.home=c:/Sun/SDK  【修改一:将javaee.home指向您的glassfish安装目录】我的如下:

javaee.home=d:/Program Files/glassfish-v2ur2

# machine name (or the IP address) where the applications will be deployed.
javaee.server.name=localhost


# port number where the app-server is accessed by the users
javaee.server.port=8080

# Hostname and port of the proxy server if you are behind a firewall
# Leave blank otherwise
proxy.host=
proxy.port=

# machine name where the admin server of the app-server is available
# defaults to the same machine as the app-server
javaee.adminserver.name=${javaee.server.name}

# port number where the admin server of the app-server is available
javaee.adminserver.port=4848


# administrator username of the app-server
javaee.server.username=admin


# File that contains the password for the App-Server admin account.
# Edit this property to point to a file that
# contains the admin password for your app-server.
# The file should contain the password in the following line:
#
#
AS_ADMIN_PASSWORD=adminadmin
#
# Notice that the password is adminadmin since this is
# the default password used by the glassfish app-server installation.
# For your purpose, use the password that you chose while installing
# the SDK

 

#javaee.server.passwordfile=${javaee.home}/samples/bp-project/passwordfile【修改二】

javaee.server.passwordfile=D:/javapetstore-2.0-ea5/bp-project/passwordfile

# default server instance name
appserver.instance=server


# for platforms other than Windows and MAC
# Uncomment and set this property to the location of the browser you
# choose to launch when an application is deployed.
# On Windows and Mac OS X the default browser is used.
#default.browser=/Applications/Firefox.app/Contents/MacOS/firefox-bin

第四步:进行完上述两处的修改之后,我们在bp-project 目录下新建一个txt 文档,在其中输入一行

AS_ADMIN_PASSWORD=adminadmin

保存文件,注意:没有扩展名,文件名为:passwordfile

 

第五步:用NetBeans打开修改之后的PetStore项目,

           找到“服务器资源”目录下的setup.xml 右键运行目标,如果您的设置没有问题,那就ok了,数据库ing...

 

last :  运行项目

          可以看到如下:

         

 

点击Enter the PetStore

 

你可能感兴趣的:(javaee,sun,Netbeans,firefox,Glassfish)