Results 1 to 2 of 2
  1. #1
    nitishlnt is offline Member
    Join Date
    Oct 2008
    Posts
    1
    Rep Power
    0

    Default Batch file to Run Java application

    Hi All,
    I am running by application in Eclipse as:
    Run As->Externat Tool -> (Argument as -Dxml=../XMLConfig/TestCase.xml)->Run.
    I have to run this application through windows batch file. In my batch file i am writing
    java -classpath %DISCQ_CLASSPATH% -DLOG4J_CONFIG_FILE=%DISCQ_HOME%/config/test/CADQA/XMLConfig/TestCase.xml com.lb.cad.qa.test.TestDispatcher In java code i am extracting the TestCase.xml value as System.getProperty(),but with this batch file i am not able to get the value.
    Could any one please help me in this issue.
    Thanks,

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,581
    Rep Power
    25

    Default

    with this batch file i am not able to get the value.
    All a simple batch file does is issue a commandline to the OS.
    It saves you from having to type in the commandline. It can be used with parameter substitution from the OS by using %1 etc on the commandline allowing the OS to replace the %x with the path to a file.

    There must be something in Eclipse that you haven't copied to the batch file.

    What is "the value" you expect? Is it a report written to the console? Add MORE at the end of the batchfile to keep the console window open.
    Do you get an error messages?

Similar Threads

  1. eclipse batch file
    By doug99 in forum Eclipse
    Replies: 6
    Last Post: 04-24-2008, 02:59 PM
  2. Replies: 0
    Last Post: 04-04-2008, 02:48 PM
  3. run a batch file as windows nt service
    By radhika123 in forum New To Java
    Replies: 0
    Last Post: 04-04-2008, 01:46 PM
  4. How to convert batch application to server app?
    By johann_p in forum New To Java
    Replies: 0
    Last Post: 03-28-2008, 09:39 PM
  5. Problem in batch file
    By marwa in forum New To Java
    Replies: 0
    Last Post: 08-14-2007, 10:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •