I want to use the Java WEKA library for classification. I only need classifiers such as LibSVM, NaiveBayes or C4.5 trees.
My labels are stored in a 1D double array. My training and test set are stored in a 2D double array where the rows are the data points and the columns are the features.

double[] labels = new double[N];
double[][] trainingData = new double[N][D];
double[][] testData = new double[X][D];
N is the number of data points in the training data, X is the number of data points in the test data and D is the number of features.

Now, I have seen that WEKA needs Instances to build the model and Instance for prediction.
How can I get this type of objects from my data?

Second, is it ok if my classes are 0 and 1 or do they have to be -1 and 1?