Hi i'm creating a program that opens a file and then sends the output to the GUI. If the user wishes they can then save a copy of the output to another file. My program seems to open files without any bother however when i try and save the output of some larger files to a text file i get this error below: Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space I tried a file of size 1.3mb which opened and then saved fine, however when i tried a file of 10mb