• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            逛奔的蝸牛

            我不聰明,但我會很努力

               ::  :: 新隨筆 ::  ::  :: 管理 ::

            Drools on Windows (Part 2 of 22) - Installation

            1. 安裝JDK

            2. 安裝Eclipse

            3. 下載安裝Eclipse的Drools插件: Drools 5.0 Eclipse 3.4 Workbench

            4. 下載Drools的運(yùn)行時環(huán)境: Drools 5.0 Binaries

            5. 啟動Eclipse, 先設(shè)置Drools的運(yùn)行時環(huán)境為Drools-5.0-bin/lib 目錄

            6. 創(chuàng)建Drools project: DroolsApp1, 全用默認(rèn)設(shè)置

            7. 把在Drools-5.0-bin下面的其他jar文件加到入工程DroolsApp1的Build Path里.

            8. 編譯運(yùn)行DroolsApp1, 如果成功, 會在操控臺輸出:

            Hello World

            Goodbye cruel world


            ====================================================================================

            下面是具體安裝信息:

            Setup of a Drools development environment is fairly straightforward.  (For a Java app.) For this exercise, I'm going to kick open Microsoft Virtual PC 2007, and start with a new instance of Windows XP Pro SP3. 

            First, install Java.  Go to the Get Java link, and install the latest version, which at the time of this writing is Version 6 Update 12.  Depending on your browser settings, you might have to download the file (jxpiinstall-6u12-fcs-bin-b04-windows-i586-17_jan_2009.exe) and run it locally.  Whatever.  The point is to step out and get Java on your machine.

            Second, install the Eclipse IDE for Java EE Developers.  It's 163Mb, and I must say a very nice and robust IDE.  It has several nifty features that I wish Visual Studio had. 

            Here's something of a surprise.  It's an xcopy deployment.  You download the file, unzip it, and copy it to where you want it to run.  I created a C:\Program Files\Eclipse directory, and placed it there.  I also create a Desktop shortcut and also pin the shortcut to the Start menu. 

            The first time you run Eclipse, it asks you to designate a workspace. The workspace is your projects folder.  Then you get the welcome page.  There is an Overview, What's New, Samples, Tutorials, and the Workbench.  The Workbench is, unsurprisingly, where you do the work.

            Next, time to get a rules engine.

            Drools is part of the jboss 'galaxy of applications'.  jboss is probably most famous for their Application Server, which I hear is quite popular in some development communities.  jboss is a division of Red Hat, and you can see a nice graphical overview of their many projects here.    But I don't need all that stuff, of course, I'm just interested in the free rules engine.  I should note that you can get enterprise-level support agreements from Red Hat for Drools.

            Navigate to the Drools download page, and you'll see a few versions of Drools there.  I'm going to download 5.0.0.M5, or Version 5 Milestone 5, and use that.  There are nine files available; I just download them all.  Broadband is awesome.

            From drools-5.0.0.M5-eclipse-all, take the four files from the plugins subdirectory, and copy them to the Eclipse plugins folder.  Mine is at C:\Program Files\Eclipse\plugins\.

            Next from drools-5.0.0.M5-eclipse-all, take the three subdirectories under features and copy them to the Eclipse features folder.  For me that's C:\Program Files\Eclipse\features\.

            Then restart Eclipse, and go to the Workbench.  Right-click in the Project Explorer, and select New... Project.  You'll get a wizard, with the first dialog being a listing of all the possible project types, and Drools should be listed, as below:

            Eclipse New Project Wizard

            Select the Drools Project type.  Click Next.  Type in a Project name; I used DroolsApp1.  Next.  Next.  Ah, here we are at the Drools Runtime dialog.

            There's No Drools Runtime Like My Drools Runtime.

            The Drools Runtime can be defined as: the set of jar files necessary to run Drools. Straightforward, right?  Eh, in a word, no.  There are numerous ways you can assemble this set of files, depending on how you intend to configure your production deployment and the specific set of functionality you intend to provide your users.  For example, if you are never going to allow your users to load in rules from Excel spreadsheets, then you don't need jxl-2.4.2. If you are only going to be using the DRL to define rules, and you won't be storing rules in Xml files, then you don't need xml-apis-1.0.b2.  Yeah, baby, that's the love in Javaland.  It's all up to you.  These dependencies are outlined in the README_DEPENDENCIES.txt file.

            What I recommend for this exercise is simple, however. 

            Go back to the files we downloaded from jboss.org.  We'll be using drools-5.0.0.M5-bin.zip.  Extract that, and place it somewhere on the file system.  I put it at C:\drools-5.0.0.M5-bin\.

            Take all the files in C:\drools-5.0.0.M5-bin\lib\*.* and copy them up to C:\drools-5.0.0.M5-bin\*.*.  That'll work for now.

            Back to the show...
            The first time you create a Drools project in Eclipse, it asks where the Drools runtime is located.  You'll need to provide that. 

            In the project wizard, click on the Configure Workspace Settings... link.  It will open the Eclipse preferences pane where you specify the location of the Drools runtime.  You can actually have a listing of multiple runtimes, and select different ones for different projects.  I just have the one runtime.  I name it Drools M5 Runtime and browse to C:\drools-5.0.0.M5-bin.  Check the box.  Finish out of the wizard.

            And voila.  You should have DroolsApp1 in your Eclipse Project Explorer. It should look like this:

             Eclipse Package Explorer

            Run it by hitting Ctrl+F11, or click the little green right arrow. If it asks, run it as a Java Application.  Or you could click Alt+Shift+X, then J.  Seriously. 

            You should see the output in the Console pane at the bottom of your IDE.  If it says "Hello World {CR}{LF} Goodbye cruel world" then congratulations. You are now a rules engine developer.  Immediately raise your rate by 9.35%.

            Next post will take a closer look at the elements of this sample app, and postulate how the overall enterprise might look.

            Link for future reference: Drools home page.

            From: http://theruntime.com/blogs/danastevens/archive/2009/02/21/drools-on-windows-part-2-of-22---installation.aspx
            posted on 2010-04-23 15:10 逛奔的蝸牛 閱讀(1627) 評論(0)  編輯 收藏 引用 所屬分類: Java
            久久精品夜色噜噜亚洲A∨| 伊人久久久AV老熟妇色| 久久SE精品一区二区| 久久99精品久久久久久不卡| …久久精品99久久香蕉国产| 久久久久亚洲AV片无码下载蜜桃| 久久香综合精品久久伊人| 久久国产香蕉视频| 久久久久久国产精品无码下载| 青青国产成人久久91网| 久久成人影院精品777| 日本久久久久久中文字幕| 久久99精品国产99久久| 久久精品草草草| 99久久精品免费看国产一区二区三区| 久久精品国产99国产精偷| 国产成人精品久久免费动漫| 久久精品国产亚洲网站| 久久久精品国产亚洲成人满18免费网站 | 51久久夜色精品国产| 国产精品日韩欧美久久综合| 久久99久久成人免费播放| 欧美精品一区二区久久| 99久久精品免费看国产一区二区三区 | 伊人久久大香线焦综合四虎| 久久精品免费网站网| 中文字幕无码久久久| 久久香蕉超碰97国产精品| 亚洲乱亚洲乱淫久久| 伊人久久大香线蕉综合网站| 亚洲成色WWW久久网站| 99久久精品国产毛片| 精品久久人人爽天天玩人人妻| 成人妇女免费播放久久久| 久久久久亚洲精品男人的天堂| 国产亚洲美女精品久久久2020| 国产人久久人人人人爽| 久久精品国产欧美日韩| 97热久久免费频精品99| 天天做夜夜做久久做狠狠| 国产精品视频久久久|