Triiger -> call batch -> Batch call java

  • Hi Team,

    am having a java file, which i want to execute in sql trigger using a batch.

    when an event occurs, my trigger will call a batch file, internally batch file should call java.

    am using below script.

    -\

    when i cal above batch file am getting below error.

    ----------------------------

    javac: file not found: SuccessMessage.java

    Usage: javac <options> <source files>

  • It's a very bad idea to call a batch from a trigger synchronously.

    I would recommend using SQL Server Service Broker instead.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • if you are going to put the whole path for the executable, i'd suggest actually putting the full name of the executable and also the path to the package; you could then skip adding it to the %path%, environmental variable ie

    C:\Program Files\Java\jre6\bin\java.exe C:\Data\MyJavaPackages\Sample.java

    I'm not a java guy, but certainly familiar with command lines, so now what is javac?

    looking in my same directory, i do not see an executable javac.exe.

    did you mean javacpl.exe or java.exe? this is the executables i see that I see in my matching folder path:

    apologies, i originally looked in the C:\Program Files\Java\jre6\bin folder.

    in my C:\Program Files\Java\jdk1.6.0_24\bin i do see a javac.exe

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply