<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks

    http://livingash.wordpress.com/2007/08/16/struts-2-and-sun-micros-toolsjar-in-eclipse-wtp/

    The configuration free classic way to start Eclipse with desired VM.

    $>eclipse -vm "C:\Program Files\Java\jdk1.6.0_01\bin"

    這個問題一般是由于使用了struts2引起的:
    用了m2eclipse 插件后,使用struts2時,需要依賴 com.sun 的 default-tools.jar,見pom.xml





    <?xml version="1.0" encoding="UTF-8"?>

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <groupId>cn.tianxing.gehouse.admin</groupId>

      <artifactId>admin.gehouse.cn</artifactId>

      <name>admin.gehouse.cn</name>

      <version>0.0.1</version>

      <description>admin.gehouse.cn</description>

      <url>http://admin.gehouse.cn</url>

      <issueManagement>

        <system>jira</system>

        <url>http://jira.gehouse.cn:8080/BrowseProject.jspa?id=10000</url>

      </issueManagement>

      <ciManagement>

        <system>continuum</system>

        <url>http://ci.gehouse.cn:8090/continuum</url>

        <notifiers>

          <notifier>

            <type>msn</type>

            <sendOnSuccess>false</sendOnSuccess>

            <sendOnWarning>false</sendOnWarning>

            <configuration>

              <address>kylindai@hotmail.com</address>

            </configuration>

          </notifier>

          <notifier>

            <type>msn</type>

            <sendOnSuccess>false</sendOnSuccess>

            <sendOnWarning>false</sendOnWarning>

            <configuration>

              <address>larrin2002@msn.com</address>

            </configuration>

          </notifier>

          <notifier>

            <type>msn</type>

            <sendOnSuccess>false</sendOnSuccess>

            <sendOnWarning>false</sendOnWarning>

            <configuration>

              <address>manjingtou-ren@hotmail.com</address>

            </configuration>

          </notifier>

        </notifiers>

      </ciManagement>

      <inceptionYear>2007-05</inceptionYear>

      <developers>

        <developer>

          <name>kylin.dai</name>

          <email>kylin.dai@gehouse.cn</email>

        </developer>

        <developer>

          <name>larrin.luo</name>

          <email>larrin.luo@gehouse.cn</email>

        </developer>

        <developer>

          <name>jason.ren</name>

          <email>jason.ren@gehouse.cn</email>

        </developer>

      </developers>

      <scm>

        <connection>scm:svn:svn://svn.gehouse.cn/sandbox/kylin/admin.gehouse.cn/trunk</connection>

      </scm>

      <organization>

        <name>gehouse.cn</name>

        <url>http://www.gehouse.cn</url>

      </organization>

      <build>

        <plugins>

          <plugin>

            <artifactId>maven-compiler-plugin</artifactId>

            <version>2.0.2</version>

            <configuration>

              <source>1.6</source>

              <target>1.6</target>

            </configuration>

          </plugin>

        </plugins>

      </build>

      <profiles>

        <profile>

          <id>default-tools.jar</id>

          <activation>

            <property>

              <name>java.vendor</name>

              <value>Sun Microsystems Inc.</value>

            </property>

          </activation>

          <dependencies>

            <dependency>

              <groupId>com.sun</groupId>

              <artifactId>tools</artifactId>

              <version>1.5.0</version>

              <scope>system</scope>

              <systemPath>${java.home}/../lib/tools.jar</systemPath>

            </dependency>

          </dependencies>

        </profile>

      </profiles>

      <dependencies>

        <dependency>

          <groupId>log4j</groupId>

          <artifactId>log4j</artifactId>

          <version>1.2.14</version>

        </dependency>

        <dependency>

          <groupId>javax.servlet</groupId>

          <artifactId>servlet-api</artifactId>

          <version>2.5</version>

        </dependency>

        <dependency>

          <groupId>dom4j</groupId>

          <artifactId>dom4j</artifactId>

          <version>1.6.1</version>

        </dependency>

        <dependency>

          <groupId>com.ibatis</groupId>

          <artifactId>ibatis</artifactId>

          <version>2.3.0.667</version>

        </dependency>

        <dependency>

          <groupId>junit</groupId>

          <artifactId>junit</artifactId>

          <version>4.1</version>

        </dependency>

        <dependency>

          <groupId>mysql</groupId>

          <artifactId>mysql-connector-java</artifactId>

          <version>5.0.5</version>

        </dependency>

        <dependency>

          <groupId>org.extremecomponents</groupId>

          <artifactId>extremecomponents</artifactId>

          <version>1.0.1</version>

        </dependency>

        <dependency>

          <groupId>commons-dbcp</groupId>

          <artifactId>commons-dbcp</artifactId>

          <version>1.2.1</version>

        </dependency>

        <dependency>

          <groupId>org.springframework</groupId>

          <artifactId>spring</artifactId>

          <version>2.0.5</version>

        </dependency>

        <dependency>

          <groupId>org.springframework</groupId>

          <artifactId>spring-mock</artifactId>

          <version>2.0.5</version>

        </dependency>

        <dependency>

          <groupId>org.springframework</groupId>

          <artifactId>spring-aspects</artifactId>

          <version>2.0.5</version>

        </dependency>

        <dependency>

          <groupId>org.apache.struts</groupId>

          <artifactId>struts2-core</artifactId>

          <version>2.0.6</version>

        </dependency>

      </dependencies>

      <reporting>

        <plugins>

          <plugin>

            <artifactId>maven-changelog-plugin</artifactId>

          </plugin>

          <plugin>

            <artifactId>maven-checkstyle-plugin</artifactId>

          </plugin>

          <plugin>

            <artifactId>maven-pmd-plugin</artifactId>

          </plugin>

          <plugin>

            <artifactId>maven-changes-plugin</artifactId>

            <reportSets>

              <reportSet>

                <reports>

                  <report>jira-report</report>

                </reports>

              </reportSet>

            </reportSets>

          </plugin>

        </plugins>

      </reporting>

    </project>





    這個pom.xml 在eclipse里加載的時候總是報告:



    Missing:

    1) com.sun:tools:jar:1.4.2

    Try downloading the file manually from the project website.

    Then, install it using the command:



    mvn install:install-file -DgroupId=com.sun -DartifactId=tools "

    -Dversion=1.4.2 -Dpackaging=jar -Dfile=/path/to/file

    Path to dependency:



    原來,是${java.home}在作怪,eclipse 沒有使用 JAVA_HOME

    默認,eclipse 使用 C:"windows"system32"javaw.exe 作為 JVM,當然找不到tools.jar



    解決方法如下:

    修改 eclipse.exe 目錄下的 eclipse.ini 指定vm,加入紅色黑體字部分,注意 -vm后面不能有空格。



    -vm

    D:"Program Files"Java"jdk1.6.0_01"bin"javaw.exe

    -vmargs

    -Xms128m

    -Xmx512m



    再次啟動 eclipse,問題解決。



    上面的pom.xml文件,也是一個 Mavne2 & Continuum 的例子,由我寫的 Maven2 &
    Continuum 持續整合 (3),發布時,網絡故障丟失了,也不打算重新再寫一篇了,上述的pom.xml,可以在continuum的 add




    maven2 projects 里,添加使用,設好 scheduler,可以設1小時 build 一次,半小時 test 一次,等不同的任務


    posted on 2010-01-10 11:02 seal 閱讀(3831) 評論(0)  編輯  收藏 所屬分類: Maven
    主站蜘蛛池模板: 亚洲黄色中文字幕| 亚洲国产成人乱码精品女人久久久不卡 | 亚洲精品国产肉丝袜久久| 成人网站免费看黄A站视频| 国产亚洲人成网站在线观看| 无码 免费 国产在线观看91| 成人伊人亚洲人综合网站222| 精品视频免费在线| 免费v片在线观看品善网| 污视频网站在线观看免费| 青青青国产色视频在线观看国产亚洲欧洲国产综合 | 91视频免费观看| 亚洲不卡av不卡一区二区| 久久久久国产精品免费免费不卡| 亚洲色欲色欲www在线丝 | 国产精品高清免费网站 | 激情综合色五月丁香六月亚洲| 精精国产www视频在线观看免费| 亚洲国产精品尤物YW在线观看| xxxxx做受大片在线观看免费| 国产精品亚洲产品一区二区三区 | 国产精品高清全国免费观看| 美女免费精品高清毛片在线视| 亚洲男人天堂2020| 久久免费视频网站| 亚洲av午夜精品无码专区| 国产精品国产免费无码专区不卡| 污污视频网站免费观看| 精品国产_亚洲人成在线高清| 三年片在线观看免费观看大全一 | 88av免费观看入口在线| 亚洲性无码AV中文字幕| 亚洲成A∨人片天堂网无码| 日本免费A级毛一片| 久久狠狠爱亚洲综合影院| 又爽又高潮的BB视频免费看| 中文字幕乱码免费看电影| 亚洲午夜国产精品无卡| 亚洲Av无码乱码在线znlu| 国产成人精品免费久久久久 | 男人j进女人p免费视频|