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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:51:07+00:00 2026-06-12T03:51:07+00:00

all am working a project for compiling and running a java source code via

  • 0

all am working a project for compiling and running a java source code via my application.
here am stuck will explain my environment here..
java 1.6.0_35 32bit and eclipse indigo using operating system windows 64 bit
when i used this code

String command = "javac "+file.getAbsolutePath();
System.out.println(command);
Process p = Runtime.getRuntime().exec(command);`

got this exception ..think error show file doesnt exist but i checked it,which is here
and when i execute via command line which compiles,but the eclipse shows this error

java.io.IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)`

can anyone fix this ,i tried a lot ..

  • 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-12T03:51:09+00:00Added an answer on June 12, 2026 at 3:51 am

    Your problem seems not so much that the file you want to compile is not found, but that the javac command itself is not found. Make sure that the Runtime can find the javac executable, eventually by passing the “PATH=/path/to/java/dir” to exec.

    See: Runtime.exec(command, enviroment, dir)

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

Sidebar

Related Questions

hello all i am working on a project in which i have a webpage
I’m working on a project where you work with all kinds of items. What
I'm working on a project that I need to eliminate all references to the
I'm working on a project and trying to use JavaScript for validating all inputs
I am working on a project, and had all of my tests passing on
I'm working on a project with couple others. We all have local copies of
i`m working on the legacy project in VB6 with huge object all with public
For the project I'm working on, I need to save all the files of
I am currently working on an android project which lists all of the apps
I am working for a PHP project that retrieves file meta information . All

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.