java - How to execute jar with command line arguments -


possible duplicate:
passing arguments jar required java interpreter

how provide command line input file in jar have jar file hello.jar execute.java file want execute command line 2 arguments;how can achive have mentioned executable.java main class in manifest file , using ant have run file ant run command line arguments

thanks , regards samarth

try in command shell:

java -cp your-classpath-dependencies-here -jar hello.jar "arg1" "arg2" 

do in ant <java> built-in task:

http://ant.apache.org/manual/tasks/java.html


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -