mjson refrence error in peer to peer nework code

瀏覽次數:10 次
跳到第一則未讀訊息

Shivam Poddar

未讀,
2019年9月9日 清晨6:48:402019/9/9
收件者:HyperGraphDB
I have the following code from the tutorial present on HyperGraphDB webpage for  Peer-to-Peer Network. 

import java.io.File;
import java.util.concurrent.Future;
import org.hypergraphdb.peer.HyperGraphPeer;
import org.hypergraphdb.*;

public class SimpleP2P {

public static void main(String[] args)
{
    File configFile = new File("hgp2p.json"); 
    HyperGraphPeer peer = new HyperGraphPeer(configFile);   //Error: The type mjson.Json cannot be resolved. It is indirectly referenced from required .class files
    Future<Boolean> startupResult = peer.start();        
    try
    {
        if (startupResult.get())
    {
        System.out.println("Peer started successfully.");
    }
    else
    {
        System.out.println("Peer failed to start.");
        peer.getStartupFailedException().printStackTrace(System.err);
    }
    } 
    catch (Exception e)
    {
        e.printStackTrace(System.err);
    }
}
}

I have included following jar files:
 1. hgdbje-1.3.jar
 2. hgdb-1.3.jar
 3. hgdbp2p-1.3.jar
 4. je-5.0.34.jar
 5. smack-3.1.0.jar
 5. smackx-3.1.0.jar

I also included the mjson jar file but I still got the same error. Please help 

回覆所有人
回覆作者
轉寄
0 則新訊息