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

  • SEARCH
  • Home
  • 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 8665811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:34:45+00:00 2026-06-12T17:34:45+00:00

I am using Windows! I want to call a small .exe application from my

  • 0

I am using Windows!

I want to call a small .exe application from my java command line which is called “saucy.exe”. It needs an input file “input.saucy”. Both are stored in the correct directory.

When I use the command

Process p = Runtime.getRuntime().exec("saucy input.saucy");

everything works fine and I get an output on the console.

However, when I try to write the output in a file

Process p = Runtime.getRuntime().exec("saucy input.saucy > output.saucy");

nothing happens.

I already found the advice in http://www.ensta-paristech.fr/~diam/java/online/io/javazine.html and tried to tokenize the command manually:

String[] cmd = {"saucy", "input.saucy > output.saucy"};
Process p = Runtime.getRuntime().exec(cmd);

It is still not working. Any advice? It is no option for me to write the output to a file with java code, because its too slow.

Again: I am using Windows (I stress that because I read several hints for Linux systems).

  • 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-12T17:34:46+00:00Added an answer on June 12, 2026 at 5:34 pm

    > is a shell command, but you are not using one. try

    String[] cmd = { "cmd", "/C", "saucy input.saucy > output.saucy" }; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to call shell script on windows environment using java code. I am
I want to FTP some files across networks using Windows FTP command prompt and
I want to realize a simple confirmation/alert box which can be called using a
i am working on some java application in which i am using jni. Well
I am working on a small windows application. The application needs to show some
In my application I want to merge PDF's with Ghostscript using the windows console.
I want to call aspx page from my silverlight application. I kept that aspx
I'm using windows 7 64 bits and I want to know if I need
Using Windows form (Vb.net & Datagridview) Checkbox is using in datagridview row. I want
I want to provide my colleagues with an interface (using Windows Forms or WPF)

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.