小编K0p*_*pp0的帖子

JAVA无效的最大堆大小.指定的大小超出了最大可表示大小

我必须运行此命令来将代码修复为xml文件:

java -Xmx5G -cp .:jsoup-1.8.2.jar CheckSyntax test.xml > test2.xml
Run Code Online (Sandbox Code Playgroud)

但它给了我这个错误:

Invalid maximum heap size: -Xmx5G
The specified size exceeds the maximum representable size.
Run Code Online (Sandbox Code Playgroud)

我怎样才能使它工作?

java

9
推荐指数
2
解决办法
6万
查看次数

使用PHP在MySQL数据库中插入JSON数据

我试图使用PHP解析JSON文件.然后我将提取的数据放在MySQL数据库中.

这是我的JSON文件

    {"u":[
        {"text":"Chef salad is calling my name, I\u0027m so hungry!",
        "id_str":"28965131362770944",
        "created_at":"dom gen 23 24:00:00 +0000 2011",
        "user":
            {"id_str":"27144739",
            "screen_name":"LovelyThang80",
            "name":"One of A Kind"}},

        {....} //Other same code
    }
Run Code Online (Sandbox Code Playgroud)

这是我的PHP代码

<?php

    //connect to mysql db

    //read the json file contents

    //convert json object to php associative array
    $data = json_decode($jsondata, true);

    //prepare variables for insert
    $sqlu = "INSERT INTO user(id_user, screen_name, name)
    VALUES ";
    $sqlt = "INSERT INTO tweet(id_user, date, id_tweet, text)
    VALUES ";

    //I analyze the whole …
Run Code Online (Sandbox Code Playgroud)

php mysql json

1
推荐指数
1
解决办法
852
查看次数

标签 统计

java ×1

json ×1

mysql ×1

php ×1