How to execute Jar file using Batch file.



Hello All,

I am new to java.

I used eclipse environment to devlop a java project whic his executing
fine
but i am facing using in batch file execution

I have created a project under C:\tool\NewTool
Eclipse IDE had folder scr & bin
under which i created a package Pack1 where i had my java files


Batch file content -> jar & bat in same folder (NewTool)
=============
@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 help me out.
TIA,
Sriram.
.



Relevant Pages

  • Re: Manifest.mf Class-path trouble
    ... >and the Manifest.mf with that jar puts another jar on the classpath ... >Alternatively I could use the java -classpath arg in the batch file, ... Here's an example of one I use for JDBC drivers: ...
    (comp.lang.java.programmer)
  • Re: calling java class from web page
    ... When I run either a batch file or .net console app from the command line the ... java application launches correctly and runs the Pro/E program as desired. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Manifest.mf Class-path trouble
    ... The Class-Path has to be relative to the current working directory ... > * forward slashes ok on windows or do I need separate versions for Win ... forward slashes are ok for all OS in java. ... > Alternatively I could use the java -classpath arg in the batch file, ...
    (comp.lang.java.programmer)
  • Re: Runtime.exec() not finding certain programs.
    ... One of which is actually another java program, ... it can't find java.exe (which the batch file needs) ... Process process = Runtime.getRuntime.exec( ...
    (comp.lang.java.programmer)
  • Re: calling java class from web page
    ... When I run either a batch file or .net console app from the command line ... java application launches correctly and runs the Pro/E program as desired. ... I have a web interface that needs to launch a java application. ...
    (microsoft.public.dotnet.framework.aspnet)