【文章內(nèi)容簡介】
lugin you just created () and then click on Add Required Plugins. Then go back to the Overview page and press Ctrl+S or File Save to save your work.If your application needs to reference plugins that cannot be determined until run time (for example the tomcat plugin), then add them manually in the Configuration tab.At this point you should test out the product to make sure it runs correctly. In the Testing section of the Overview page, click on Synchronize then click on Launch the product. If all goes well, the application should start up just like before.Plugins vs. featuresOn the Overview page you may have noticed an option that says the product configuration is based on either plugins or features. The simplest kind of configuration is one based on plugins, so that39。s what this tutorial uses. If your product needs automatic update or Java Web Start support, then eventually you should convert it to use features. But take my advice and get it working without them first.Running it outside of EclipseThe whole point of all this is to be able to deploy and run standalone applications without the user having to know anything about the Java and Eclipse code being used under the covers. For a real application you may want to provide a selfcontained executable generated by an install program like InstallShield or NSIS. That39。s really beyond the scope of this article though, so we39。ll do something simpler.The Eclipse plugin loader expects things to be in a certain layout so we39。ll need to create a simplified version of the Eclipse install directory. This directory has to contain the native launcher program, config files, and all the plugins required by the product. Thankfully, we39。ve given the PDE enough information that it can put all this together for us now.In the Exporting section of the Product Configuration editor, click the link to Use the Eclipse Product export wizard. Set the root directory to something like RcpTutorial1. Then select the option to deploy into a Directory, and enter a directory path to a temporary (scratch) area such as C:\Deploy. Check the option to Include source code if you39。re building an open source project. Press Finish to build and export the program.The piler options for source and class patibility in the Eclipse Product export wizard will override any options you have specified on your project or global preferences. As part of the Export process, the plugin is code is repiled by an Ant script using these options.The application is now ready to run outside Eclipse. When you39。re done you should have a structure that looks like this in your deployment directory: RcpTutorial1 | .eclipseproduct | | + configuration | + plugins Note that all the plugins are deployed as jar files. This is the remended format starting in Eclipse . Among other things this saves