Domanda

I am so pain for installing scribe & hdfs. worth to appreciate, I solved most of the problems. However, I am stuck here.

I install libhdfs , and I write a "Hello world" test:

#include <iostream>
#include <string>
using namespace std;
#include "hdfs.h"

int main(int argc,char *argv[]){
    string host = "10.210.74.143";
    int port = 9000;
    hdfsFS fs = hdfsConnect(host.c_str(),port);
    return 0;
}

It print this msg when I run it:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

I swear I have set the CLASSPATH

È stato utile?

Soluzione

Firstly, you are running a C program instead of using a dynamic library from a Java Program. Is that really what you intended to do?

If so, maybe you need to explicitly create a JVM (interesting): See http://www.inonit.com/cygwin/jni/invocationApi/c.html unless hdfsConnect function does it for you.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top