1// BEGIN LICENSE BLOCK
2// Version: CMPL 1.1
3//
4// The contents of this file are subject to the Cisco-style Mozilla Public
5// License Version 1.1 (the "License"); you may not use this file except
6// in compliance with the License.  You may obtain a copy of the License
7// at www.eclipse-clp.org/license.
8//
9// Software distributed under the License is distributed on an "AS IS"
10// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
11// the License for the specific language governing rights and limitations
12// under the License.
13//
14// The Original Code is  The ECLiPSe Constraint Logic Programming System.
15// The Initial Developer of the Original Code is  Cisco Systems, Inc.
16// Portions created by the Initial Developer are
17// Copyright (C) 2000 - 2006 Cisco Systems, Inc.  All Rights Reserved.
18//
19// Contributor(s): Stefano Novello / Josh Singer, Parc Technologies
20//
21// END LICENSE BLOCK
22
23//Title:        Java/ECLiPSe interface
24//Version:      $Id: Tester.java,v 1.1 2006/09/23 01:54:13 snovello Exp $
25//Author:       Josh Singer / Stefano Novello
26//Company:      Parc Technologies
27//Description:  Test suite
28import com.parctechnologies.eclipse.*;
29import java.io.*;
30import java.net.*;
31
32public class Tester
33{
34  public static void main(String[] args) throws Exception
35  {
36    EclipseEngineOptions options = new EclipseEngineOptions();
37
38    options.setEclipseDir(new File(System.getProperty("eclipse.directory")));
39
40    options.setUseQueues(true);
41
42    EclipseEngine eclipse = new OutOfProcessEclipse(options);
43//    EclipseEngine eclipse = EmbeddedEclipse.getInstance(options);
44
45    eclipse.rpc("lib(ic), X #= 4, write_exdr(output,X), flush(output)");
46
47    EXDRInputStream e_in = new EXDRInputStream(eclipse.getEclipseStdout());
48
49    System.out.println(e_in.readTerm());
50
51  }
52}
53