Configuring WDK Development Environment in Eclipse

[转]Configuring WDK Development Environment in Eclipse

Abstract

This configuration guide is for developers who want to use the Eclipse IDE for WDK development. It discusses one approach for configuring Eclipse for WDK development.

Eclipse 3.1

Note: The configuration assumes that you do not have any plugins installed and that you have a base Eclipse install.

  • Click on the menu item ‘Windows->Preferences’.
    • From the tree view on the left hand side go to ‘Java->Compiler->Building’.
    • From right hand side unselect (clear) the ‘Scrub output folders…’ checkbox, which is under the ‘Output folder’ section. If this option is enabled then all standard WDK/Webtop classes will be scrubbed by Eclipse and you won’t be able to rebuild them if you don’t have the sources.
    • Click on ‘Ok’.

  • Click on ‘File->New Project’.
  • Select ‘Java Project’ and click on ‘Next’.
  • You need to create the project in an external location. There should be a ‘Checkbox’ that allows you to select this option and a ‘Browse’ button that allows you to browse-select the external folder.
  • Select the WDK/Webtop web application directory as the project folder. For example, <TOMCAT_HOME>\webapps\webtop.
  • Click on ‘Next’
  • Do not select any source folders right now. Leave the defaults.
  • Ensure that the output folder has been set to WEB-INF/classes folder. If not, browse and select it explicitly.
  • Click on ‘Finish’.
  • Right click on the new WDK project from the standard tree view in the Java perspective and click on ‘New->Folder’.
    • In the ‘Folder name’ text box, name the folder (e.g wdKClasses). This folder will be added, in a later step, in the classpath of the project so that the existing WDK classes can be referenced.
    • Click on the ‘Advanced’ button (towards bottom of screen) and check (select) the ‘Link to folder in filesystem’ Checkbox. Browse and select the <virtual-root>\WEB-INF\classes folder.
    • The above procedure creates a new folder in the project space that points to the ‘\WEB-INF\classes’ folder.
  • Right click on the new WDK project from the standard tree view in the Java perspective and click on ‘Properties’.
    • From the list on the left hand side of the ‘Properties’ window click on ‘Java Build Path’.
    • From the tabs on the right hand side select ‘Sources’. Select the PROJECT_NAME\custom\src as one of the source folders. You may add any number of additional source folders.
    • Now select the ‘Libraries’ tab and click on ‘Add External Jars’ button. Add the DFC-related jars and any other jars that you need.
    • In the previous step be sure to add the jars that contain the Java servlet and JSP classes. For Tomcat 4.1.30 on our machine, this jar was c:\Tomcat4130\common\lib\servlet.jar. For BEA 8.1 on our machine, this file was c:\bea\weblogic81\server\lib\weblogic.jar. For Tomcat 5.0.28 there are two jars, TOMCAT_HOME\common\lib\servlet-api.jar and TOMCAT_HOME\common\lib\jsp-api.jar
    • On the same tab click on the ‘Add Class Folder’ button and add the folder ‘wdkClasses’ that was created previously. This references all WDK\Webtop classes in the classpath.
    • Click on ‘Ok’

After completing this procedure, you can create your own classes and compile them. The results of compilation will directly go into the WEB-INF\classes folder just like the rest of the WDK/Webtop classes. You can also create XML configuration files and JSPs within the IDE using other Eclipse plugins for XML editing and JSP editing respectively.

 

 

[转]这样结束,我的eclipse中的webtop/src中就有这样的错误:the type comparable is not generic,it cannot be parameterized with argument.但这暂不影响工作,等用到正则表达式时,在程序中也出现这样的问题.还以为eclipse有问题,后新建工程,单独用正则表达式没问题,那很有可能是webtop中jar包的问题. 经过多次试验,只要删了fileselector1.1.jar就好了.不明白是为什么!!!

 

 

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值