‘bin’ is where binary (executable) files are stored. These are the Java tools, e.g. java.exe, javac.exe, jar.exe, etc.
‘lib’ is where library files are stored, these are the Java classes supplied for you to use in your programs. They are mainly stored as compressed directories, in .jar files.