Home

Calling LPRUN - From Java application - getting error @ LINQPad.Cmd.LPRun.Start(String[] args)

Full stack trapped by Java application
IOException: The handle is invalid.
System.ConsolePal.SetConsoleOutputEncoding(Encoding enc)
System.Console.set_OutputEncoding(Encoding value)
LINQPad.Cmd.LPRun.Start(String[] args)
'LPRun7.exe' returned exit code 1

Any ideas on what to look at?

Comments

  • Is LPRun being run as an ordinary Console process?

  • I can't directly answer but my assumption would be no.

    We are running a third party application made by Redpoint Global. It offers a module inside of its tool set called a StreamingTransform. It should be calling the process as an ordinary process - I have not had problems using it to call .net console applications directly.

    With that said I did test calling from a java application external to the StreamingTransform using the syntax:
    Runtime . getRuntime( ). exec();
    And it functioned properly.

    Given the new information and the limited knowledge of the Redpoint wrapping of the process call it is likely this has nothing to do with Linqpad...but is there anything you can think of in Linqpad to address the errors which are Linqpad related?

  • edited April 2022

    I often wrap lprun.exe inside a bat, cmd, or ps1 script when I need to run:

    lprun.exe my-linq-pad-file.linq arg1 arg2 arg3

    Then call the script from the API. I think lprun requires "shell type execution" not "process type execution" methods to run correctly, but this depends on the calling API. I've had problems calling lprun from languages outside of .Net and wrapping lprun in scripts solved it for me.

Sign In or Register to comment.