Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8950469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:27:44+00:00 2026-06-15T13:27:44+00:00

I am trying to interact with a simple .exe I created from some Python

  • 0

I am trying to interact with a simple .exe I created from some Python code. I have tested the .exe through Windows cmd and it works just fine. When I try to send the same input to the .exe through my java program to produce the graphs I need, OutputStream just writes “error” to the console. I have tried sending a string and an integer through OutputStream but the same results are obtained no matter what. I have already interacted with X-Foil.exe, a console application use to produce airfoil data files, with great success through this same java app. As I have to preform curve fitting to the data, I used Python with the matplotlib plugin then used py2exe to create the .exe. I am trying to create a web application with the end goal of designing an aircraft wing, hence the use of java. Here is the method being use which I am having the problem with:

    public void PyGrapher(String NACA_4d) {
    try {
        ProcessBuilder builder = new ProcessBuilder("PyAirfoilGraphing\\dist\\GraphPolars.exe");
        builder.redirectErrorStream(true);
        Process pr = builder.start();
        OutputStream out = pr.getOutputStream();
        BufferedReader in = new BufferedReader(new InputStreamReader(pr.getInputStream()));

        double CL_alpha;

        out.write((NACA_4d + "\n").getBytes());

        System.out.println(in.readLine());
        System.out.println(in.readLine());
        System.out.println(in.readLine());
        System.out.println(in.readLine());
        //CL_alpha = Double.parseDouble(in.readLine());

        pr.waitFor();
        pr.destroy();
        out.close();
        in.close();

    } catch (IOException | InterruptedException ex) {
    }
}

Here is what I have read in from the console:

  Input NACA 4-digit code: error
  Traceback (most recent call last):
    File "GraphPolars.py", line 16, in <module>
  IOError: [Errno 2] No such file or directory: '..\\..\\AirfoilPolars\\NACA_0024.dat'

I am stumped, and have been for quite some time. There is not a problem with the python file, and it runs fine by itself in the current directory. Can anyone help, please?

-Nick K

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:27:45+00:00Added an answer on June 15, 2026 at 1:27 pm

    Could it be something with relative paths? Python default path may not be picking up the local directory/file.

    Did you try passing it the full windows path, ‘C:\Foo\bar\AirFoil\… ‘ with properly escaped ‘\’ characters?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to interact with the windows command prompt from code. My goal
I'm trying to learn some python and I wanted for python to interact with
I'm trying to interact with an application over the network which uses a simple
I am trying to write a simple application to interact with NFC tags, but
I am trying to interact with a javascript api (bare in mind I have
How can I consume a oData webservice from Delphi (I'm trying to interact with
So i have been looking into JNI calls so i can interact with some
I'm trying to interact with a google map using python. I've built an application
I'm trying to write a simple web service client to interact with my simple
I'm trying to interact with my Arduino Uno from my Android tablet running 4.0.3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.