run a java program

女生的网名这么多〃 提交于 2019-11-29 17:35:12

Just use java -cp p2 maxconnect4 arg1 arg2 arg3. -cp sets the classpath of the JVM. Edit: I assume you don't use a package for maxconnect4.

Assuming that the class has package p2; declared, that should work -- although the more standard way is to use dots instead of slashes in the fully-qualified classname -- java p2.maxconnect.

If the class has no package declaration, try java -cp p2 maxconnect. You need to specify a classpath such that the class file is found at the top level.

If the class has some other package declaration, you need to put it into a folder that matches its package.

Try with

java p2.maxconnect4 arg1 arg2 arg3

Also, you can try to check the class name, and verify if the file p2/maxconnect4.class exists.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!