Results 1 to 6 of 6
  1. #1
    c98
    c98 is offline Member
    Join Date
    May 2011
    Posts
    3
    Rep Power
    0

    Default Java command line help

    Hi,

    I'm runnning java using command prompt on Vista but I'm having problems with viewing the data my code is outputting.

    Say If I ran this code,

    Java Code:
    class CommandProblem
    {
    	public static void main(String[] args)
    	{
    		for(int i=0;i<100;i++)
    		{
    			System.out.println("i is " + i);
    		}
    	}
    }
    I will only be able to view from 52 onwards,despite scrolling up. Is there a way to fix this? It's rather annoying.


    Edit: Screenshot is here: (Arrow indicates can't scroll up more)

    ImageShack&#174; - Online Photo and Video Hosting

    Thanks

    C98
    Last edited by c98; 05-15-2011 at 11:11 AM. Reason: Uploaded photo

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    9

    Default

    I'm not too sure what you mean, does it just cut off from 0-52?

  3. #3
    c98
    c98 is offline Member
    Join Date
    May 2011
    Posts
    3
    Rep Power
    0

    Default

    Yes.
    Once the code has executed it will take you down to 99, but you can only scroll up to the point where i is 52. Anything before that is gone. So I can't see that i is 12 etc.. has been output.

  4. #4
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    9

  5. #5
    c98
    c98 is offline Member
    Join Date
    May 2011
    Posts
    3
    Rep Power
    0

    Default

    yey fixed.

    Thanks

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,006
    Blog Entries
    7
    Rep Power
    23

    Default

    Quote Originally Posted by c98 View Post
    yey fixed.

    Thanks
    Use the 'more' command? i.e. "java YourClass | more".

    edit: never mind, I was too slow again ...

    kind regards,

    Jos
    I have the stamina of a seal; I lie on the beach instead of running on it.

Similar Threads

  1. How do you use the Mac command line for Java?
    By java beginner in forum New To Java
    Replies: 16
    Last Post: 05-07-2011, 04:34 AM
  2. Command line args for your java app!
    By aadem in forum New To Java
    Replies: 2
    Last Post: 03-04-2011, 10:05 PM
  3. Replies: 2
    Last Post: 07-02-2010, 02:20 PM
  4. Java command line
    By agouzoul in forum New To Java
    Replies: 2
    Last Post: 04-02-2008, 12:12 PM
  5. Unable to execute command line command in java
    By LordSM in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 12:23 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
  •