I have read CodeMirror User Manual, but I couldn't find how to set mode for JAVA, could you help me?
CodeMirror.fromTextArea(document.getElementById("code1"), {
lineNumbers: true,
mode: "text/x-csrc",
matchBrackets: true
});
"text/x-java"
is the MIME type used to get the Java mode.