当我想运行用 js 编写的脚本时,我收到一条关于我的类路径中缺少 js 引擎的消息:
SQL> script
2 ctx.write('hi');
3* /
js language engine not found
Please add js language engine to the classpath
SQL>
这是我的 Java 参数:
PS C:\run_scripts_sqlcl> sql /nolog
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
SQLcl: Release 21.3 Production on Tue Nov 02 17:54:24 2021
Copyright (c) 1982, 2021, Oracle. All rights reserved.
SQL> show java
Java Detail
-----------
java.home= C:\Program Files\Java\jre1.8.0_291
java.vendor= Oracle Corporation
java.vendor.url= http://java.oracle.com/
java.version= 1.8.0_291
--------------------------------------------------------------------------------
os.arch= amd64
os.name= Windows 10
os.version= 10.0
path.separator= ;
file.separator= \
line.separator=
user.dir= C:\run_scripts_sqlcl
user.home= C:\Users\user
user.name= user
user.language= en
user.region= null
file.encoding= Cp1251
Used memory: 78.1MB
Max available memory: 1,820.5MB
--------------------------------------------------------------------------------
SQL_HOME=null
Classpath
--------------------------------------------------------------------------------
null
但是当我jjs
从 Java/bin 目录直接调用时,它工作正常:
PS C:\Program Files\Java\jre1.8.0_291\bin> .\jjs.exe
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
jjs> print('hi!')
hi!
jjs>
如何将 js 引擎添加到我的类路径?我应该设置一些特定的参数吗?