Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-27-2007, 08:37 AM
Member
 
Join Date: Nov 2007
Posts: 15
kureikougaiji is on a distinguished road
accessing command prompt using java (netbeans)...
hello.. i'm a 4th year college student here in Philippines, and i am now doing my thesis.. can somebody teach me and give me a source code on how to access command prompt using java specifically netbeans..??.. please.. thanks..
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-27-2007, 09:04 AM
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
How do you mean? you mean to be able to do something like:
Code:
ping www.google.com
and print the results?
Runtime can do that
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-27-2007, 09:11 AM
Member
 
Join Date: Nov 2007
Posts: 15
kureikougaiji is on a distinguished road
no.. how can i run the command prompt using java without going to it..??.. i don't know how to put it in words correctly..
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-27-2007, 09:17 AM
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
Thats exactly what the Runtime class does. (with help of the Process class)
Here is an example: Executing a Command (Java Developers Almanac Example)

edit:
Or do you mean to make the command prompt show up? You can use the above example and execute "cmd" which will open a new command prompt.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-27-2007, 09:25 AM
Member
 
Join Date: Nov 2007
Posts: 15
kureikougaiji is on a distinguished road
so i can compile and execute a java source code in a java system using that?... thanks!!!...
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 06-27-2008, 04:14 PM
Member
 
Join Date: Jun 2008
Posts: 1
freakysk is on a distinguished road
dont want the cmd console
what if i want to execute a command from java and i dont need the command prompt console pop up? i just need to execute the cmd....
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 06-27-2008, 05:01 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
When Runtime.exec() won't
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I show * in a password prompt? tanalyw New To Java 3 04-16-2008 04:09 PM
Java command line agouzoul New To Java 2 04-02-2008 02:12 PM
Unable to execute command line command in java LordSM New To Java 1 08-08-2007 02:23 AM
problem when I try to compile a program from command prompt osval Advanced Java 2 08-06-2007 11:16 PM
how to issue the command of Ctrl-C (copy) in Java bilal_ali_java Advanced Java 0 07-18-2007 05:14 PM


All times are GMT +3. The time now is 04:38 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org