diff --git a/gosu-core/src/main/java/gw/internal/gosu/parser/FileSystemGosuClassRepository.java b/gosu-core/src/main/java/gw/internal/gosu/parser/FileSystemGosuClassRepository.java
index <HASH>..<HASH> 100644
--- a/gosu-core/src/main/java/gw/internal/gosu/parser/FileSystemGosuClassRepository.java
+++ b/gosu-core/src/main/java/gw/internal/gosu/parser/FileSystemGosuClassRepository.java
@@ -759,7 +759,7 @@ public class FileSystemGosuClassRepository implements IFileSystemGosuClassReposi
       if( content == null ) {
         Stream<String> lines = null;
         try {
-          if( _file.isJavaFile() ) {
+          if( _file.isJavaFile() && _classType != ClassType.JavaClass ) {
             lines = Files.lines( _file.toJavaFile().toPath() );
           }
           else {
@@ -779,7 +779,7 @@ public class FileSystemGosuClassRepository implements IFileSystemGosuClassReposi
         finally {
           lines.close();
         }
-        _content = new SoftReference<>( content );
+        _content = _classType == ClassType.JavaClass ? new SoftReference<>( null ) : new SoftReference<>(content);
       }
       return content;
     }
Don't cache Java files and always read them through the BufferReader