If the following stack trace information appears when you run the Java program: Java code: java. SQL. SQLException: java. lang. outOfMemoryError: Java heap space at com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 1073) at com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 987) at com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 982) at com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 927) at com. mysql. jdbc. util. handleNewInstance (U Til. java: 435) at com. mysql. jdbc. PreparedStatement. getInstance (PreparedStatement. java: 872) indicates that the program consumes the maximum memory that JVM can use the operating system. In this case, you can check whether the code is suspected of excessive object creation. If not, you can use non-standard options in the java command line. For more information, see http://www.software8.co/wzjs/java/2820.htmlcommandcode:-Xmsp-Xmxp (-Xms and-Xmx's first X must be capitalized; otherwise, it cannot) the first parameter specifies the initial memory size, such as set to 5 MB and-Xms5m. (M or M) The second parameter specifies the maximum memory, that is, the maximum memory value that the JVm can obtain from the operating system. For example, set it to 10 M-Xmx10m. Generally, the initial size is smaller than the maximum value. -Xms <-Xmx: Command code: java-Xms128m-Xmx256m