java - intellij-idea执行程序时引入文件参数的路径?
PHPz
PHPz 2017-04-17 17:38:33
0
1
764

实现类似 命令行“ java Test tinyW.txt < tinyT.txt ” 这样

我想在程序运行后面加入参数"tinyW.txt < tinyT.txt" ,查了下要在edit configuration里设置program arguments

]
不过有个问题是文件所在的路径怎么设置,相对路径不知道是怎样,新手求教

PHPz
PHPz

学习是最好的投资!

reply all(1)
小葫芦

When you use it in the main function, if it is a relative path, pass the relative path. If it is an absolute path, pass the absolute path. The parameter here is just a string array. What kind of parameters you need can be passed directly. This It’s completely up to you

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!