• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java API of command prompt

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friend,
I want to make a program in java which is like a command prompt and if we write a command like "dir,cd,so on". it can be executed and display result in the same java windows. so for this purpose there is any Java API which help me to create a program ot if you have a program so please send me. thanks in avance. its urgent.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using Java 6, have a look at the java.io.Console class.

You might also want to read EaseUp to learn why it may be counter-productive to use phrases like "It's urgent".
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, please don't post the same question to more than one forum; see our explanation here. I've deleted the other copy of this thread you posted today.

Now, as to your question: what part do you need help with? Do you actually want to "create" this program, or are you actually asking for an already existing program? If you want to write it yourself, what part are you asking for help with? Parsing input? Running programs? Let us know what part you need help with.

If you want the thing all done already, there's no "CommandShell" class in the standard API, but there are things like BeanShell (use Google) which are exactly what you describe.
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
will your program be console based or gui based if its console based than java.io package would be enough but if its gui based than java.io and java.awt would be suitable.
 
reply
    Bookmark Topic Watch Topic
  • New Topic