Skip to content

Commit

Permalink
Switch to Node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Seva D authored and Seva D committed Nov 11, 2023
1 parent 770c480 commit 139b440
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import com.caoccao.javet.values.reference.IV8ValueArray;
import com.caoccao.javet.utils.ThreadSafeMap;
import com.caoccao.javet.interop.binding.BindingContext;
import com.caoccao.javet.enums.JSRuntimeType;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
Expand All @@ -77,7 +78,7 @@ public Class<?> getClass(String className) throws ClassNotFoundException {
}
}

private boolean useNode = false;
private boolean useNode = true;
private Map<String, Object> setVariables = new HashMap<String, Object>();
private V8Runtime cx = null;
private V8ValueObject scope;
Expand Down Expand Up @@ -124,6 +125,7 @@ private V8Runtime getRuntime() throws JavetException {
if (useNode) {
if (javetEnginePoolNode == null) {
javetEnginePoolNode = new JavetEnginePool<>();
javetEnginePoolNode.getConfig().setJSRuntimeType(JSRuntimeType.Node);
}
IJavetEngine<NodeRuntime> javetEngine = javetEnginePoolNode.getEngine();
NodeRuntime nodeRuntime = javetEngine.getV8Runtime();
Expand Down

0 comments on commit 139b440

Please sign in to comment.