How to create a Flex project with java Env so you can compile and debug it in Jboss directly?

How to create a Flex project with java Env so you can compile and debug it in Jboss directly?

1: create a new folder in $JBOSS_HOME/server/default/deploy, Eg. flexEnv.war

2: extract the flex.war (you can find this sample package in the flex-dataservice folder) to the flexEnv.war

3: remove the jrun-web.xml in the WEB-INF folder

4: copy a jboss-web.xml into the WEB-INF folder, set the context-root as flexEnv

5: create a flex project in the FlexBuilder(I use the version 3.0), eg. flexEnv
 project name: flexEnv
 Application type: web application
 server technology: J2ee
 user remote object access service/livecycle data services
 Root folder: $JBOSS_HOME/server/default/deploy/flexEnv.war
 Rott URL: http://localhost:8080/flexEnv
 Context root: /flexEnv
 Output folder: $JBOSS_HOME/server/default/deploy/flexEnv.war/webApp
 Main source folder: webApp

6: now you have a flex project name flexEnv. the next step is to add the java project nature to this project.

7: close this project

8: open the .project under your project folder.

9: add the java build command and nature and classes link to the project.

10: open the project

11: now open the property page of this project, you will find that both the flex and java setting pages are here.

12: create a folder "conf" in the project folder. here we will put the config files, like the remoteServices.xml.

13: copy services-config.xml, remoting-config.xml, proxy-config.xml, messaging-config.xml, data-management-config.xml
 from the $JBOSS_HOME/server/default/deploy/flexEnv.war/WEB-INF/flex to the the conf folder.
 So we can do the modification to these config files and save them in our project folder.

14: set the -services to the services-config.xml in the conf folder.

15: now build the project. you will find that a flexEnv.swf is generated in the $JBOSS_HOME/server/default/deploy/flexEnv.war/webApp.

16: visit the swf file by: http://localhost:8080/flexEnv/webApp/flexEnv.swf

17: now let's test the java code.

18: create a link folder: classes and refer it to  $JBOSS_HOME/server/default/deploy/flexEnv.war/WEB-INF/classes.

19: open the property page of the project and go to the "java build path", open the source tab, and set the output folder to flexEnv/classes.
    the source folder is flexEnv/src.

20: create a java class like : org.test.Hello

21: build the project and you will find that the class file is generated under the $JBOSS_HOME/server/default/deploy/flexEnv.war/WEB-INF/classes.


so now we make it.


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值