Java SeleniumWebDriver创建项目jar

Java SeleniumWebDriver创建项目jar,java,selenium-webdriver,Java,Selenium Webdriver,我需要运行我的项目在其他系统(计算机2)也通过cmd什么要求需要在(计算机2) 这些是代码,也包含main方法 public class Mainpage { @SuppressWarnings("deprecation") public static void main(String[] args) { TestListenerAdapter t2=new TestListenerAdapter(); TestNG testng = n

我需要运行我的项目在其他系统(计算机2)也通过cmd什么要求需要在(计算机2)

这些是代码,也包含main方法

public class Mainpage 
{

    @SuppressWarnings("deprecation")
    public static void main(String[] args) {
         TestListenerAdapter t2=new TestListenerAdapter();
         TestNG  testng = new TestNG();
         testng.setTestClasses(new Class[]{login.class});
         testng.addListener(t2);
         testng.run();
    }
}

不清楚您遇到了什么错误(或者您是否遇到了错误),但是更改
“http://www.gmail.net/“
”http://www.gmail.com/"
可能会解决您的问题。

我可以在我的系统中成功运行,但其他系统显示失败它在system2中出现了什么故障?您是否也在为您的项目使用任何构建工具?欢迎使用Stack Overflow!寻求调试帮助的问题(“为什么这段代码不起作用?”)必须包括所需的行为、特定的问题或错误以及在问题本身中重现它所需的最短代码。没有明确问题陈述的问题对其他读者没有用处。请参阅:。请详细询问。很抱歉,基本上我想在其他系统上运行我的代码,但我添加了selenium jar和我自己系统的chrome路径,因此,如果我在其他系统上运行我的代码,它会显示测试案例失败。我如何在任何系统上运行我的selenium项目而不出现任何问题?我正在使用eclipse并将项目导出到runnable jar中,但它在其他系统中不起作用。你的问题太广泛了。您需要缩小问题范围,以准确显示哪些不起作用。尝试重现问题并提供解决方案
public class Mainpage 
{

    @SuppressWarnings("deprecation")
    public static void main(String[] args) {
         TestListenerAdapter t2=new TestListenerAdapter();
         TestNG  testng = new TestNG();
         testng.setTestClasses(new Class[]{login.class});
         testng.addListener(t2);
         testng.run();
    }
}