Output window of IntelliJ IDEA cuts output

ID : 20426

viewed : 4

Tags : intellij-ideaconsole-outputintellij-idea

Top 5 Answer for Output window of IntelliJ IDEA cuts output

vote vote


Preferences/Settings -> Editor -> General -> Console, check the box next to Override console cycle buffer size, set to a larger number than 1024 KB.

Screenshot of the Setting Window

vote vote


Couldn't get more votes to close the question so I have to answer it myself.


#----------------------------------------------------------------------- # This option controls console cyclic buffer: keeps the console output size not higher than the specified buffer size (Kb). Older lines are deleted. # In order to disable cycle buffer use idea.cycle.buffer.size=disabled idea.cycle.buffer.size=1024  
vote vote


Check out the FileUtils class in Apache Commons - specifically iterateFiles:

Allows iteration over the files in given directory (and optionally its subdirectories).

vote vote


Using org.apache.commons.io.FileUtils

File file = new File("F:/Lines");        Collection<File> files = FileUtils.listFiles(file, null, true);      for(File file2 : files){     System.out.println(file2.getName());             }  

Use false if you do not want files from sub directories.

vote vote


For Java 7+, there is also https://docs.oracle.com/javase/7/docs/api/java/nio/file/DirectoryStream.html

Example taken from the Javadoc:

List<Path> listSourceFiles(Path dir) throws IOException {    List<Path> result = new ArrayList<>();    try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, "*.{c,h,cpp,hpp,java}")) {        for (Path entry: stream) {            result.add(entry);        }    } catch (DirectoryIteratorException ex) {        // I/O error encounted during the iteration, the cause is an IOException        throw ex.getCause();    }    return result; } 

Top 3 video Explaining Output window of IntelliJ IDEA cuts output