在MyEclipse的安装目录下,有D:Program FilesMyEclipse 6.5myeclipseeclipseplugins 的插件路径。
里边很多插件的配置文件包。
找到 文件夹 com.genuitec.eclipse.easie.tomcat6_6.5.0.zmyeclipse650200806
复制为 com.genuitec.eclipse.easie.tomcat6_6.5.1.zmyeclipse650200806
然后,需要修改一些配置文件。
文件路径
D:Program FilesMyEclipse 6.5myeclipseeclipsepluginscom.genuitec.eclipse.easie.tomcat6_6.5.0.zmyeclipse650200806plugin.properties
可以修改:
pluginName = MyEclipse EASIE Tomcat 44
menu.label = chengkaoMember.x // 这个名字会显示在Server的配置上边(最后一张图片所示)
复制为 com.genuitec.eclipse.easie.tomcat6_6.5.1.zmyeclipse650200806
然后,需要修改一些配置文件。
文件路径
D:Program FilesMyEclipse 6.5myeclipseeclipsepluginscom.genuitec.eclipse.easie.tomcat6_6.5.0.zmyeclipse650200806plugin.properties
可以修改:
pluginName = MyEclipse EASIE Tomcat 44
menu.label = chengkaoMember.x // 这个名字会显示在Server的配置上边(最后一张图片所示)
文件路径
D:Program FilesMyEclipse 6.5myeclipseeclipsepluginscom.genuitec.eclipse.easie.tomcat6_6.5.0.zmyeclipse650200806plugin.xml
修改了一下ID
id="com.genuitec.eclipse.easie.tomcat61"
D:Program FilesMyEclipse 6.5myeclipseeclipsepluginscom.genuitec.eclipse.easie.tomcat6_6.5.0.zmyeclipse650200806plugin.xml
修改了一下ID
id="com.genuitec.eclipse.easie.tomcat61"
然后关闭MyEclipse 重新启动,你在看web server的列表 就发现增加了一个Tomcat
是不是很好啊 这样 你多个项目 可以对应多个Tomcat了 哈哈
查看Config文件 设置 Tomcat的设置 (JDk路径; Tomcatserver:Enable; Tomcat Home 路径等)
好了,到现在基本上已经完成了,但还有点小问题,新建立的Tomcat目录下面没有JDK,Launch,Paths等选项。
现在解决这新问题:
打开plugin.properties文件
把里边的
menu.label = Tomcat 6.x
menu.jdk.label = JDK
menu.path.label = Paths
menu.launch.label = Launch
menu.path.label = Paths
menu.launch.label = Launch
改为
menu.label2 = Tomcat 6.x 2
menu.jdk.label2 = JDK
menu.path.label2 = Paths
menu.launch.label2 = Launch
menu.path.label2 = Paths
menu.launch.label2 = Launch
然后打开plugin.xml文件
把里边的
<page name="%menu.label"
改为
<page name="%menu.label2"
依次类推修改name值为menu.jdk.label,menu.path.label,menu.launch.label 的文件,改成和plugin.properties文件中的名字相对应。
下面分享一下配置文件要改的地方,标黄色的为改动项。
plugin.properties文件
****************begin*****************
pluginName = MyEclipse EASIE Tomcat 6 3
providerName = Genuitec, LLC
prefPageExtension = Tomcat 6 3 Preference Page Extension
providerName = Genuitec, LLC
prefPageExtension = Tomcat 6 3 Preference Page Extension
# added extra space to fix PR 5682
menu.label3 = Tomcat 6.x 3
menu.jdk.label3 = JDK
menu.path.label3 = Paths
menu.launch.label3 = Launch
menu.label3 = Tomcat 6.x 3
menu.jdk.label3 = JDK
menu.path.label3 = Paths
menu.launch.label3 = Launch
****************END******************
plugin.xml文件
********************BEGIN*************
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?> <!-- i18n: added to work around 2.1 bug -->
<plugin
id="com.genuitec.eclipse.easie.tomcat63"
name="%pluginName"
version="6.5.3.zmyeclipse650200806"
provider-name="%providerName"
class="com.genuitec.eclipse.easie.tomcat6.Tomcat6LauncherPlugin">
<?eclipse version="3.0"?> <!-- i18n: added to work around 2.1 bug -->
<plugin
id="com.genuitec.eclipse.easie.tomcat63"
name="%pluginName"
version="6.5.3.zmyeclipse650200806"
provider-name="%providerName"
class="com.genuitec.eclipse.easie.tomcat6.Tomcat6LauncherPlugin">
<runtime>
<library name="easietomcat6.jar"/>
</runtime>
<requires>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.debug.core"/>
<import plugin="org.eclipse.swt"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.jdt.launching"/>
<import plugin="org.eclipse.jdt.debug"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.boot"/>
<import plugin="com.genuitec.eclipse.core"/>
<import plugin="com.genuitec.eclipse.core.common"/>
<import plugin="org.eclipse.debug.ui"/>
<import plugin="org.eclipse.jdt.ui"/>
<import plugin="org.eclipse.jdt.debug.ui"/>
<import plugin="com.genuitec.eclipse.easie.core"/>
<import plugin="com.genuitec.eclipse.wdt.jsp.debug"/>
<import plugin="com.genuitec.eclipse.easie.tomcat"/>
<import plugin="org.eclipse.core.runtime.compatibility"/>
</requires>
<library name="easietomcat6.jar"/>
</runtime>
<requires>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.debug.core"/>
<import plugin="org.eclipse.swt"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.jdt.launching"/>
<import plugin="org.eclipse.jdt.debug"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.boot"/>
<import plugin="com.genuitec.eclipse.core"/>
<import plugin="com.genuitec.eclipse.core.common"/>
<import plugin="org.eclipse.debug.ui"/>
<import plugin="org.eclipse.jdt.ui"/>
<import plugin="org.eclipse.jdt.debug.ui"/>
<import plugin="com.genuitec.eclipse.easie.core"/>
<import plugin="com.genuitec.eclipse.wdt.jsp.debug"/>
<import plugin="com.genuitec.eclipse.easie.tomcat"/>
<import plugin="org.eclipse.core.runtime.compatibility"/>
</requires>
<extension
point="org.eclipse.ui.startup">
</extension>
<extension
id="com.genuitec.eclipse.easie.tomcat63.preferencepageextension"
name="%prefPageExtension"
point="org.eclipse.ui.preferencePages">
<page
name="%menu.label3"
category="com.genuitec.eclipse.easie.tomcat.preferencepage"
class="com.genuitec.eclipse.easie.tomcat6.preference.Tomcat6LauncherPreferencePage"
id="com.genuitec.eclipse.easie.tomcat63.preferencepage">
<keywordReference id="com.genuitec.eclipse.easie.core.tomcat.keyword"/>
<keywordReference id="com.genuitec.eclipse.easie.core.server.keyword"/>
<keywordReference id="com.genuitec.eclipse.easie.core.applicationserver.keyword"/>
</page>
<page
name="%menu.jdk.label3"
category="com.genuitec.eclipse.easie.tomcat63.preferencepage"
class="com.genuitec.eclipse.easie.tomcat6.preference.Tomcat6LauncherJVMPreferencePage"
id="com.genuitec.eclipse.easie.tomcat6.jdkpage">
<keywordReference id="com.genuitec.eclipse.easie.core.tomcat.keyword"/>
<keywordReference id="com.genuitec.eclipse.easie.core.server.keyword"/>
<keywordReference id="com.genuitec.eclipse.easie.core.applicationserver.keyword"/>
</page>
<page
name="%menu.path.label3"
category="com.genuitec.eclipse.easie.tomcat63.preferencepage"
class="com.genuitec.eclipse.easie.tomcat6.preference.Tomcat6LauncherClasspathPreferencePage"
id="com.genuitec.eclipse.easie.tomcat6.classpathpage">
<keywordReference id="com.genuitec.eclipse.easie.core.tomcat.keyword"/>
<keywordReference id="com.genuitec.eclipse.easie.core.server.keyword"/>
<keywordReference id="com.genuitec.eclipse.easie.core.applicationserver.keyword"/>
</page>
<page
name="%menu.launch.label3"
category="com.genuitec.eclipse.easie.tomcat63.preferencepage"
class="com.genuitec.eclipse.easie.tomcat6.preference.Tomcat6LauncherModesPreferencePage"
id="com.genuitec.eclipse.easie.tomcat6.launchpage">
<keywordReference id="com.genuitec.eclipse.easie.core.tomcat.keyword"/>
<keywordReference id="com.genuitec.eclipse.easie.core.server.keyword"/>
<keywordReference id="com.genuitec.eclipse.easie.core.applicationserver.keyword"/>
</page>
</extension>
</plugin>
除name要与前边对应外,别的只要设置成不同的就可以。有些id可能不需要改动,大家要是查出来哪一项不需要改动告诉我一声,谢谢了。。
接下来还是有问题,如图,我启动的是第二个Tomcat结果显示启动的是第三个Tomcat
这个问题只能使用中级利器了,改包。。。。
找到你copy的插件的路径D:Program FilesMyEclipse 6.5myeclipseeclipsepluginscom.genuitec.eclipse.easie.tomcat6_6.5.2.zmyeclipse650200806
红色部分为刚刚拷贝的Tomcat的插件,你的可能和我的不一样
在里边有一个叫easietomcat6.jar的jar包用winRaR打开,在路径easietomcat6.jarcomgenuitececlipseeasie omcat6下修改configuration.properties与messages.properties两个资源文件,黄色为修改内容,我感觉随便修改一个值就可以,不重复就行,其中Tomcat6_server_defaultinstancename是services下Tomcat的显示名称
********************configuration.properties文件****************
msg.user.abouttitle=About EASIE Tomcat 6.x Plugin
msg.user.about=The EASIE Tomcat 6.x plugin is provided to MyEclipse by Genuitec, LLC. For more information please seehttp://www.myeclipseide.com.
msg.user.about=The EASIE Tomcat 6.x plugin is provided to MyEclipse by Genuitec, LLC. For more information please seehttp://www.myeclipseide.com.
Tomcat6_server_typename=tomcat63
Tomcat6_server_defaultinstanceid=tomcat63Server
# added extra space to fix PR 5825
Tomcat6_server_defaultinstancename=Tomcat 6.x 3
Tomcat6_server_defaultinstanceid=tomcat63Server
# added extra space to fix PR 5825
Tomcat6_server_defaultinstancename=Tomcat 6.x 3
************************END*********************************
************************messages.properties********************
Tomcat6LauncherPlugin_ERROR_VM_VERSION=Tomcat 6 3 Server requires a Java5 or greater JVM for execution
************************END**********************************
重启MyEclipse,大功告成。。。