Results 1 to 2 of 2

Thread: DOS help.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2007
    Posts
    85

    DOS help.

    I'm using a DOS command to run a program (not written in java). How can I use another DOS command to retrieve the value of a string inside a class file.

    Inside the class file I have:

    Code:
    public static String thestring = "string value.";
    How can I use a dos command to echo that string.

    Code:
    echo &thestring%

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: DOS help.

    You mean print the value of the variable to the DOS window from within Java? If so, use
    Code:
    System.out.println(variableName);
    Or "print" instead of "println" to not have a new line character at the end.


    Has someone helped you? Then you can Rate their helpful post.

Posting Permissions

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



Click Here to Expand Forum to Full Width