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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:29:02+00:00 2026-05-10T15:29:02+00:00

I use the Eclipse IDE to develop, compile, and run my Java projects. Today,

  • 0

I use the Eclipse IDE to develop, compile, and run my Java projects. Today, I’m trying to use the java.io.Console class to manage output and, more importantly, user input.

The problem is that System.console() returns null when an application is run ‘through’ Eclipse. Eclipse run the program on a background process, rather than a top-level process with the console window we’re familiar with.

Is there a way to force Eclipse to run the program as a top level process, or at least create a Console that the JVM will recognize? Otherwise, I’m forced to jar the project up and run on a command-line environment external to Eclipse.

  • 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. 2026-05-10T15:29:02+00:00Added an answer on May 10, 2026 at 3:29 pm

    I assume you want to be able to use step-through debugging from Eclipse. You can just run the classes externally by setting the built classes in the bin directories on the JRE classpath.

    java -cp workspace\p1\bin;workspace\p2\bin foo.Main 

    You can debug using the remote debugger and taking advantage of the class files built in your project.

    In this example, the Eclipse project structure looks like this:

    workspace\project\                  \.classpath                  \.project                  \debug.bat                  \bin\Main.class                  \src\Main.java 

    1. Start the JVM Console in Debug Mode

    debug.bat is a Windows batch file that should be run externally from a cmd.exe console.

    @ECHO OFF SET A_PORT=8787 SET A_DBG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%A_PORT%,server=y,suspend=y java.exe %A_DBG% -cp .\bin Main 

    In the arguments, the debug port has been set to 8787. The suspend=y argument tells the JVM to wait until the debugger attaches.

    2. Create a Debug Launch Configuration

    In Eclipse, open the Debug dialog (Run > Open Debug Dialog…) and create a new Remote Java Application configuration with the following settings:

    • Project: your project name
    • Connection Type: Standard (Socket Attach)
    • Host: localhost
    • Port: 8787

    3. Debugging

    So, all you have to do any time you want to debug the app is:

    • set a break point
    • launch the batch file in a console
    • launch the debug configuration

    You can track this issue in bug 122429. You can work round this issue in your application by using an abstraction layer as described here.

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

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer kender - The QWebView is made up of a QWebPage… May 11, 2026 at 11:39 am
  • added an answer else if (StartDate.getDate().equals(cal1.getTime())) {...} assuming you didn't change the time… May 11, 2026 at 11:39 am
  • added an answer Couple options come to mind: 1) malloc the memory in… May 11, 2026 at 11:39 am

Related Questions

I use the Eclipse IDE to develop, compile, and run my Java projects. Today,
I'm involved in a project that is attempting to use the Eclipse RCP splash
I could use the following: <fileset dir=C:\Program Files\eclipse\plugins\myplugin> <include name=extraStuff.jar /> </fileset> But that
I've trying to use Eclipse JDT AST parsing classes. After including the initial JAR,
Instead of hardcoding the default @author template I would like Eclipse to use user's
I'm just getting into the practice of version control (I'd like to use Eclipse
I use the VS2008 command prompt for builds, TFS access etc. and the cygwin
I use the Boost Test framework for my C++ code but there are two
I use the on-demand (hosted) version of FogBugz. I would like to start using
I use the commercial version of Jalopy for my Java projects but it doesn't

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.