Use java applet to get response result from batch file in command line

Posted on 2007-07-23
Last Modified: 2013-12-22
I use java to create batch file to get SOAP service and get response.

Batch file as below:
set CLASSPATH=D:/SOAP Connection Sample/lib;log4j-1.2.8.jar;j2ee.jar;db2jcc.jar;db2jcc_license_cisuz.jar;db2jcc_license_cu.jar;
java HttpConnectionTestTT C:/telenet.txt

C:/telenet.txt as below:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=""
<GetRecordingID xmlns="">

Can I use applet to call this batch file and get the response in my applet?
I don't want to put them into applet.
Please show me a sample, thanks!

Question by:johnnywong71
    LVL 92

    Expert Comment

    applet would need to be signed to execute a batch file.
    why do u want to use an applet?
    LVL 1

    Author Comment

    It because SOAP can't run in my applet when I load it in IE.

    I need to change a lot to add SOAP method in it.

    I can use the following code to run batch file but can't get SOAP response in applet.

    LVL 92

    Expert Comment

    you'll get a similiar error running a batch. You need to sign the applet (to fix both problems)

    Or make the soap request from the server, and pass results to applet.
    LVL 1

    Author Comment

    Thanks for your information.
    But I have not enough time to complete this task.

    I just try to run batch file in IE and export the response result into txt file. And IE use FileReader() to get the response from txt file.
    It looks like work.
    Do you think so?

    LVL 92

    Accepted Solution

    unless your applet is signed it won't be able to run the batch, or read the local disk.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
    Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now