Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to execute Jar file using Batch file.

59 views
Skip to first unread message

sriram.p...@gmail.com

unread,
Jan 31, 2008, 10:24:47 AM1/31/08
to
Hello All,

I am new to java programming. I used Eclipse IDE to devlop the java
code. It works fine but unable to execute from command line.

I have create the project in Eg: C:\tool\toolname
Eclipse IDE had two folders bin & src
under src i created a package package1 & create few java files.

Batch file content (Bat & Jar in same folder which is "toolname")
=============
@echo off
cls
Set ClassPath=%ClassPath%; cmdbwc.jar
java -Xmx200m -cp .src.cmdbwc.cmdbw_main %1 %2 %3 %4 %5 %6 %7

Call & error
=========
C:\UtilityTool\cmdbwc>java -Xmx200m -cp .src.cmdbwc.cmdbw_main -i "C:
\UtilityToo
l\Deny.log" -d " " -o "C:\UtilityTool\Denyreport.html"
Unrecognized option: -i
Could not create the Java virtual machine.

Please let me know is my call is correct & do i need to do any more
setting,,


Thanks In Advance
Sriram.

0 new messages