You must first install the Java Runtime Environment (JRE) to run Java applets in K-Meleon. You can download the latest version from http://www.java.com/en/index.jsp. After you install JRE, K-Meleon automatically detects your JRE installation and no other configuration is necessary. To see if JRE is properly installed, type about:plugins in the URL bar. If you see Java Plug-in listed, K-Meleon has properly recognized the JRE.
Note: If you change the User Agent/Browser Identification, Java may not work.
(The above text can be found in the FAQ, too.)