Skip to content
Snippets Groups Projects
Commit 90a8d01c authored by Guy Zana's avatar Guy Zana
Browse files

java: define the test class so it can be accessible from javascript

parent 9c25467e
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ package com.cloudius.main;
import java.io.*;
import com.cloudius.tests.TCPEchoServerTest;
import sun.org.mozilla.javascript.*;
import sun.org.mozilla.javascript.tools.shell.*;
......@@ -19,6 +21,7 @@ public class RhinoCLI {
global.init(cx);
Scriptable scope = ScriptableObject.getTopLevelScope(global);
ScriptableObject.defineClass(scope, TCPEchoServerTest.class);
FileReader cli_js = new FileReader("/console/cli.js");
cx.evaluateReader(scope, cli_js, "cli.js", 1, null);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment