Search Results

Search found 2 results on 1 pages for 'oderebek'.

Page 1/1 | 1 

  • Java output file doesnt recognise \n as linebreak

    - by oderebek
    for a Java project for a University Class I have a method that saves ASCII images as a uniline string and another method called toString rebuilds this ASCII image and returns as a string. When I run my program on the Eclipse my output looks on console alright and multiline, and there are line breaks where they should be. But when I run it with the command line with a redirected outputfile java myprogram < input output the text in the output is uniline without line breaks Here is the code of the method public String toString(){ String output = ""; for(int i=0; i<height; i++){ output=output+image.substring(i*width, i*width+width)+"\n"; } return output; } What should I do so I can get a multiline output text file

    Read the article

  • Passing arguments stored in a file when running projects in Netbeans

    - by oderebek
    My problem is that I can't remember how I can pass the arguments when running a project in netbeans. There is not enough documentation on web if anybody could help it would be highly appreciated. Here is what I know, you can change the run configurations under run Set Project Configuration Default Configuration there there is a entry space where zou can enter the arguments to be passed. I have a file called "AsciiShop.java" which to be runned and I need to pass the arguments stored in a file called "asciishop-A04-PP.i1". When I am using terminal or cmd.exe I can run the program with java AsciiShop < asciishop-A04-PP.i1 and it works perfect. I want to be able to the same on netbeans. I have placed the file in the default working directory which contains src and bin folders. What should I write in the arguments entry field on the project configurations window, so that it works same like java AsciiShop < asciishop-A04-PP.i1

    Read the article

1