Re: Batch file params



On 27 Aug 2005 04:40:52 -0700, iblamemicrosoft@xxxxxxxxx wrote:

> I know how in html files you can simply go:
>
> <param name="number" value="1">

For an applet? Yes.

> but how can you replicate this in a batch file?

For an applet? You can't (at least not easily).

For an application, you can provide arguments on the
command line when you invoke Java, like..

java TheMainClass arg1 arg2 arg3

For more information on the 'java' command, check the JavaDocs
<http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/java.html#synopsis>

Once you can start your Java application from the command
line. You can put that command in a .bat file and it should
work just fine to launch your application with the arguments
at the end of the 'java' command.

HTH

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Come on boys, let's push it hard.."
P.J. Harvey 'Victory'
.



Relevant Pages

  • 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: Version history
    ... And a certain key combination if it was a command line program. ... I used it in an applet. ... but haven't seen too much about it with Java. ... The java source code files that come with JDK are a great example of ...
    (comp.lang.java.programmer)
  • Re: A constructive debate: Eclipse or NetBeans?
    ... that Linux and command-line driven languages like OCaml are so much more ... That's because most people never learn to use a command line or a simple ... Trying to run other people's OpenGL-based Java demos from the web I find ... OpenGL). ...
    (comp.lang.java.softwaretools)
  • Process.waitFor() returns, but threads reading output/error streams are blocked on read
    ... threads to read in the out/err streams, ... i'll include the java source below, but the problem seems extremely specific ... passed in on the command line). ... process is hung if i terminate the process the command line tool connects to ...
    (comp.lang.java.programmer)
  • Re: My shell cant find Java
    ... I downloaded java with netbeans from Sun ... >> Each time I type java I get an unknown command error. ... how you set environment variable depends on what shell you're using. ...
    (comp.lang.java.help)