java - 在 debain 6.0.1 亚马逊 EC2 实例中安装 selenium webdriver

标签 java maven selenium amazon-ec2

在 Debian 中安装 selenium

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

我正在关注此链接

我创建了 pom.xml 然后安装jdk和jre 然后安装apache maven

当我尝试这个命令时

   mvn clean install

它给了我一个错误

  root@debian:/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

我该如何解决这个问题..

或者还有其他简单的教程在 debain 6.0.1 中安装 selenium webdriver

在尝试此链接后,我收到了这个新错误

                    root@debian:~# 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

最佳答案

检查您的 JAVA_HOME 变量配置是否正确。使用 Linux 的 Java Home 设置指南 http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/

这里是有关 Amazon EC2 和 Java 的链接 主页 http://www.techrepublic.com/blog/the-enterprise-cloud/how-to-use-the-command-line-with-amazons-ec2-api-tools/5574/# .

关于java - 在 debain 6.0.1 亚马逊 EC2 实例中安装 selenium webdriver,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23104927/

相关文章:

java - Maven:重命名应用程序 EAR

java - 通过 title 属性获取页面元素 - Selenium 和 Java

testing - 点击动态生成的几个链接部分

java - 哈希和保护传输中的数据

java - 如何格式化 Java 中循环打印的行

调用私有(private)方法时出现 Java InvokingTargetException

java - 有没有办法在 Quarkus 单元测试中回滚事务?

maven - JBoss 7.1.1.WildFly 最终迁移指南

java - 如何编写一个可以以JSON格式输出依赖项的maven插件?

c# - 无法在 Chrome v76 中隐藏 "Chrome is being controlled by automated software"信息栏