2014-04-16 53 views
0

在Debian中安裝硒安裝硒的webdriver 6.0.1亞馬遜EC2實例

http://docs.seleniumhq.org/docs/03_webdriver.jsp

我正在

我創建的pom.xml 然後安裝JDK和JRE 及以下鏈接然後安裝了Apache Maven的

當我嘗試這個命令

mvn clean install 

它給了我一個錯誤

[email protected]:/var/www/sele_webd# mvn clean install 
    Error: JAVA_HOME is not defined correctly. 
    We cannot execute /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.i686/bin/java 

我該如何解決呢..

或者有沒有其他的簡易教程thryin此之後的Debain 6.0.1

安裝硒的webdriver鏈接我得到這個新的錯誤

    [email protected]:~# mvn install 
     [WARNING] 
     [WARNING] Some problems were encountered while building the effective settings 
     [WARNING] Unable to parse element 'port', must be an integer (position: END_TAG seen ...<port>port_number</port>... @7:31) caused by: java.lang.NumberFormatException: For input string: "port_number" @ /root/.m2/settings.xml, line 7, column 31 
     [WARNING] 
     [INFO] Scanning for projects... 
     [INFO] ------------------------------------------------------------------------ 
     [INFO] BUILD FAILURE 
     [INFO] ------------------------------------------------------------------------ 
     [INFO] Total time: 0.092 s 
     [INFO] Finished at: 2014-03-25T21:11:57-07:00 
     [INFO] Final Memory: 2M/15M 
     [INFO] ------------------------------------------------------------------------ 
     [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/root). Please verify you invoked Maven from the correct directory. -> [Help 1] 
     [ERROR] 
     [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
     [ERROR] Re-run Maven using the -X switch to enable full debug logging. 
     [ERROR] 
     [ERROR] For more information about the errors and possible solutions, please read the following articles: 
     [ERROR] [Help 1] http://cwiki.apache.org/confluen 
+0

這可能是您的環境變量的問題。什麼是JAVA_HOME設置爲。 –

+0

我如何檢查它設置爲我試圖回聲$ JAVA_HOME,但它打印一個空行 – Terence

回答

2

檢查你的JAVA_HOME變量被正確配置。使用Linux設置Java Home的指南http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/

以下是有關Amazon EC2和Java Home的鏈接http://www.techrepublic.com/blog/the-enterprise-cloud/how-to-use-the-command-line-with-amazons-ec2-api-tools/5574/#

+0

感謝重播@Lt_Shade。但我使用debain(linux)操作系統 – Terence

+0

我把一個鏈接如何配置它與Linux –

+0

這個鏈接幫助我很多http://mshsoftware.com/site/kb/set-java-home-on-linux .html ..感謝您的幫助 – Terence