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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:37:09+00:00 2026-05-14T07:37:09+00:00

I dont know how to describe it well, but i will try. Ok, i

  • 0

I dont know how to describe it well, but i will try. Ok, i want to be able to build my java program so that when it opens, it will look and work exactly as it does in the console. So it reads the Scanner class and prints normally, and does everything it would do if it was in the console. Ive looked around for this and havent found anything. I can make a gui java program fairly easily, but i would rather have a terminal, console like program, that works exactly as the java console, thanks.

  • 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-14T07:37:09+00:00Added an answer on May 14, 2026 at 7:37 am

    You might be looking for the standard input and output members of the java.lang.System class:

    class HelloWorld {
    
      public static void main(String... argv) {
        System.out.println("Hello, World!");
      }
    
    }
    

    For processing input, you can use Scanner on standard input:

    Scanner scanner = new Scanner(System.in);
    

    If you want to get really fancy, you can print some of your output to System.err, which is a PrintStream just like System.out.


    From the comment, “when i compile my classes i get a jar file, which does nothing when i click on it, which i think is normal because its not gui,” I think your problem is an operating system problem (Windows?), not a Java problem.

    Windows maps the “Open” action for JAR files to run with javaw.exe, which doesn’t create a console. You’ll either need to modify the default file association on each machine, or create something like a batch file that overrides this default behavior.

    You could write two programs: the first is your actual “console” Java application, and another is just a shell that uses Runtime.exec() to create a Windows console (cmd) and executes the first program within it.

    There are also opensource projects (check Sourceforge) that wrap your JAR in a Windows executable.

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

Sidebar

Related Questions

Hey, well I don't really know how to describe this but here's my current
So, I know both Java and Objective-C quite well, but (perhaps strangely) never really
I don't even know how to describe what I want, but here goes. Assume
I don't even know how to describe this. I have a WPF project that
I dont know how many values will be present from Cell A1 to A65555.
I dont know what happend but I cant register any dlls anymore. It seems
I will describe an app that consists of an AJAX form, that also works
A well known problem with Java Applets in webpages is that browsers ignore the
I don't really know how to describe what I'm doing, but this example should
I am a bit new to WCF and will try to clearly describe what

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.