0

i am facing java heap space error while compiling java files from Netbeans.

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at com.mysql.jdbc.Buffer.<init>(Buffer.java:59)
    at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1975)
    at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3437)
    at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:488)
    at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3131)
    at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2299)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2722)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2788)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2738)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1617)

i alreadey set VM option for opencv as native library like this:

-Djava.library.path="C:\opencv\build\java\x86"

how can i set second option for java max heap size -Xmx2048m in VM option ? or there is another approach to increase java heap size in netbeans?

STaefi
  • 4,297
  • 1
  • 25
  • 43
Sony Khan
  • 1,330
  • 3
  • 23
  • 40

0 Answers0