i'm trying to connect java with constraint logic, i'm using netbeans for java and eclipse 6.1 for constraint logic, but when i'm trying to run the code there is an exception appears java.lang.IllegalArgumentException: Missing eclipse.directory property
i've used a tutorial that explain how to connect them, which says that After compilation, to run the program, start the Java interpreter as you normally would but before the name of the class, supply the command line option
-Declipse.directory=<eclipse_directory>
and i don't know where to place it in netbeans
here is the code
import com.parctechnologies.eclipse.*;
import java.io.*;
public class eclipseConnection {
public static void main(String[] args) throws Exception
{
try{
EclipseEngineOptions eclipseEngineOptions = new EclipseEngineOptions();
EclipseEngine eclipse;
eclipseEngineOptions.setUseQueues(false);
eclipse = EmbeddedEclipse.getInstance(eclipseEngineOptions);
eclipse.rpc("write(output, 'hello world'), flush(output)");
((EmbeddedEclipse) eclipse).destroy();
}catch(Exception e){
System.out.println(e);
}
}
}
You can add the property definition in the 'Run' menu:
Run > Set Project Configuration > Customize...
. Make sure you enter the property definition-Declipse.directory=<eclipse_directory>
in theVM Options
section.