“OutOfMemoryError: GC overhead limit exceeded”: parse large json file with java

前端 未结 3 917
北荒
北荒 2021-01-24 13:36

I try to parse large json file (more 600Mo) with Java. My json file look like that:

{
    \"0\" : {\"link_id\": \"2381317\", \"overview\": \"mjklmk         


        
3条回答
  •  耶瑟儿~
    2021-01-24 13:46

    Increase the JVM heap space by setting the environment variables :

    SET _JAVA_OPTIONS = -Xms512m -Xmx1024m
    

    But it cant be a permanent solution as your file can be increased in future

提交回复
热议问题