I am programming with scala, when I write a simple "println("hello world")" program and use 'sbt package' to publish it into a jar file the file is only 4kb in size but that doesn't help me since the jar file won't run without the scala library. So after searching online I found sbt-assembly which packages everything including the scala library into one "fat jar" but the resulting jar file is over 13Mb in size So my question is when jar files get executed or accessed does the entire jar file get loaded into memory, or will only the required data and functions get loaded into the memory as needed?