Results 1 to 5 of 5
  1. #1
    AJHunter is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default Big Ideas, Little Knowledge

    Hi!

    I'm new to Java (obviously), but I have big ideas. Ideas bigger than my knowledge, time, or attention span. I have some very basic programming knowledge; I I've used DarkBASIC, HampsterSpeak, and can sort of figure out what a JS is doing. That's about it. So for now, I'm going to ask some simple questions. Hopefully the answers are simple, too.

    First off, is there an easy way to set up a button (the GUI was built in NetBeans) to send any arbitrary Windows command to a command prompt? For example, a button issues TRACERT command with any URL the user inputs, then the output from the command prompt is written in a separate text field within the Java program. Or a button that issues the IPCONFIG /all command, then outputs the IP address, MAC address, Subnet Mask, etc., into the aforementioned text field.

  2. #2
    cultclassic is offline Member
    Join Date
    Mar 2011
    Posts
    64
    Rep Power
    0

    Default

    What's your reason for choosing Java? Cross platform usage?

  3. #3
    AJHunter is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default

    That's one reason. But mostly it was just on a whim... I do want this particular project to be platform-specific, though.

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    It's called Runtime.exec, or better ProcessBuilder. Those, however, should always be last resorts.

    Edit: I.E. you can get network interface information using varying classes in the java.net package, and the JPCAP API can do treaceroute type stuff.
    Last edited by masijade; 03-19-2011 at 10:39 PM.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    You don't really want to use Java for this as it's just not the right tool for this job, since in order to succeed in any way much less the most basic of ways you have to go outside the bounds of Java. This would be much better solved using a programming language that allows closer access to the OS such as C or C++ or by using a scripting language, for instance AutoIt if this is for windows.

Similar Threads

  1. After getting knowledge core java...
    By spk2712 in forum New To Java
    Replies: 2
    Last Post: 01-23-2011, 12:14 PM
  2. Artificial Intelligence knowledge base in java
    By ala_mages in forum Advanced Java
    Replies: 5
    Last Post: 12-06-2010, 11:44 AM
  3. Java developer with ffmpeg knowledge needed
    By u2390j103 in forum Jobs Offered
    Replies: 0
    Last Post: 11-13-2010, 10:43 AM
  4. Want to Maximize your knowledge on Hibernate, Spring ?
    By fitce in forum Reviews / Advertising
    Replies: 2
    Last Post: 04-22-2010, 07:18 PM
  5. knowledge exchange
    By jeeprogrammer in forum New To Java
    Replies: 0
    Last Post: 09-26-2009, 04:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •