Intellij idea 运行主类参数
我正在使用intelliJ,我运行了java类的主要方法,下面是我得到的输出Intellij idea 运行主类参数,intellij-idea,Intellij Idea,我正在使用intelliJ,我运行了java类的主要方法,下面是我得到的输出 usage: MyJavaClass -comment <arg> comments for generated patch -force force overwrite of merge conflicts. Defaults to false. -patch <arg> output file for generated patch -sourc
usage: MyJavaClass
-comment <arg> comments for generated patch
-force force overwrite of merge conflicts. Defaults to false.
-patch <arg> output file for generated patch
-source <arg> Source name (required)
-target <arg> Target name (required)
-v verbose output. Defaults to false.
-DCLIENT_CONF Location for client configuration settings
Process finished with exit code 255
用法:MyJavaClass
-生成的修补程序的注释
-强制覆盖合并冲突。默认为false。
-生成的修补程序的修补程序输出文件
-源名称(必需)
-目标名称(必需)
-v详细输出。默认为false。
-用于客户端配置设置的DCLIENT_CONF位置
进程已完成,退出代码为255
我想我应该输入两个数据库名称(本地),因为我想将信息从第一个数据库传输到第二个数据库,但是我如何传递参数,因为我可以看到上面的屏幕,谢谢使用运行编辑配置。。。菜单项,找到MyJavaClass的配置,并在“程序参数”字段中指定参数。在Maven项目中,您可以使用exec Maven插件
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.path.MyJavaClass</mainClass>
<arguments>
<argument>-source</argument>
<argument>-target</argument>
</arguments>
</configuration>
</plugin>
org.codehaus.mojo
execmaven插件
1.5.0
JAVA
org.path.MyJavaClass
-来源
-目标