如何在命令行中获取项目路径 [英] How to get the project path in command line

查看:44
本文介绍了如何在命令行中获取项目路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Eclipse 中创建了一个 TestNG 项目,我使用 System.getProperty("user.dir") 来获取项目的基本文件夹(如D:\project\selenium"),但是当我在命令行运行TestNG时,base文件夹返回C:\users\username\",请问有什么办法可以解决这个问题?

I create a TestNG project in Eclipse, and I use System.getProperty("user.dir") to get the base folder (like "D:\project\selenium") of the project, but when I run the TestNG in the command line, the base folder returns "C:\users\username\", is there any way to solve this question?

推荐答案

最新版本的 eclipse 插件修复了类似问题:https://github.com/cbeust/testng/issues/903

A similar issue was fixed in the latest version of the eclipse plugin: https://github.com/cbeust/testng/issues/903

您应该尝试升级插件.

这篇关于如何在命令行中获取项目路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆