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 7697841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:06:14+00:00 2026-05-31T22:06:14+00:00

I am trying to open Weka from cmd line, using C#. This is the

  • 0

I am trying to open Weka from cmd line, using C#. This is the code that I’m using. It’s giving me an error for Weka.Start() line, and the error is : Win32 exception was unhandled. System cannot find the file specified. Please help me out. Thanks

 ProcessStartInfo WekaStartInfo = new ProcessStartInfo(@"C:\Program Files\Weka-    3-6\java -Xmx1536m -jar weka.jar");


        WekaStartInfo.UseShellExecute = false;
        WekaStartInfo.RedirectStandardOutput = true;
        WekaStartInfo.RedirectStandardError = true;
        WekaStartInfo.CreateNoWindow = false;

        Process Weka = new Process();
        Weka.StartInfo = WekaStartInfo;
        Weka.Start();
        string output = Weka.StandardOutput.ReadToEnd();
        Weka.WaitForExit();
  • 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-05-31T22:06:15+00:00Added an answer on May 31, 2026 at 10:06 pm

    There are two options to start WEKA from a
    C# application.

    1. In the WEKA install directory there is a
      batch file called RunWeka.bat. To start WEKA
      using this batch file use the following
      code:

      ProcessStartInfo wekaStartInfo = 
               new ProcessStartInfo(@"c:\Program Files\Weka-3-6\runweka.bat", "default");
      
      wekaStartInfo.WorkingDirectory = @"c:\Program Files\Weka-3-6";
      
      wekaStartInfo.UseShellExecute = false;
      wekaStartInfo.RedirectStandardOutput = true;
      wekaStartInfo.RedirectStandardError = true;
      wekaStartInfo.CreateNoWindow = false;
      
      using(Process weka = new Process())
      {
        weka.StartInfo = wekaStartInfo;
        weka.Start();
      }
      
    2. To start WEKA without using the batch file
      use the following code:

      ProcessStartInfo wekaStartInfo = 
          new ProcessStartInfo(@"javaw", @"-classpath . RunWeka -i .\RunWeka.ini -w .\weka.jar -c default");
      
      wekaStartInfo.WorkingDirectory = @"c:\Program Files\Weka-3-6";
      wekaStartInfo.UseShellExecute = false;
      wekaStartInfo.RedirectStandardOutput = true;
      wekaStartInfo.RedirectStandardError = true;
      wekaStartInfo.CreateNoWindow = false;
      
      using(Process weka = new Process())
      {
        weka.StartInfo = wekaStartInfo;
        weka.Start();           
      }
      

    In both cases you have to set the working directory.

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

Sidebar

Related Questions

I'm trying to open MVC project using VS2010 . I'm opening this project from
I'm trying to open and read from a serial port using the System.IO.Ports.SerialPort class.
I am trying to open one window from another using makeKeyAndOrderFront. The new window
I'm trying to open an URI with Swing that I get above error. What
When trying to open a file using this command: $fd = fopen('majestic_files/majestic_record.txt','w'); I get
I am trying to open a terminal that would execute a code and copy
i'm trying to open new Calc document, and i'm getting this error: System.IO.FileLoadException: Mixed
I am trying open a new window using url.Action. And the new Window url
im trying to open a file using StreamReader and ive to set a Encoding,
I'm trying to open a file and create a list with each line read

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.