shell - run a java program -



shell - run a java program -

i want run java programme using shell script. java programme in p2 directory , name maxconnect4 , have compiled it, class name maxconnect4. write shell commands this:

java p2/maxconnect4 arg1 arg2 arg3

this shell command not work. give error: exception in thread "main" java.lang.noclassdeffounderror: p2/maxconnect

however, compile java programme in way:

javac p2/*.java, , works.

just utilize java -cp p2 maxconnect4 arg1 arg2 arg3. -cp sets classpath of jvm. edit: assume don't utilize bundle maxconnect4.

java shell command

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -