计划从将来的JDK版本中删除Sencha Nashorn引擎

问题描述

您知道如何解决/删除此警告吗?

我只是在做一个 sencha app buildnpm run clean && cross-env webpack --env.profile=modern --env.environment=production --env.treeshake=yes

操作系统是Ubuntu 18 LTS。

i [ext]: ext-webpack-plugin v7.2.0,Ext JS v7.2.0 Commercial Edition,Sencha Cmd v7.2.0.84,webpack v4.44.1n/a
i [ext]: Starting production build for extjs
i [ext]: Processing Build Descriptor : modern (production environment)
i [ext]:  [ERR] WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.gson.internal.bind.ReflectiveTypeAdapterFactory (file:/builds/interpid/extjs-package-ipdu/node_modules/@sencha/cmd/dist/lib/closure-compiler-v20180610.jar) to field java.io.File.path WARNING: Please consider reporting this to the maintainers of com.google.gson.internal.bind.ReflectiveTypeAdapterFactory WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] 
i [ext]: Loading compiler context
i [ext]: Loading app json manifest...
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]: Processing data with ClosureCompressor
i [ext]: Writing concatenated output to file /build/production/myApp/generatedFiles/modern/app.js
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]: Writing content to /build/temp/production/myApp/modern/slicer-temp/bootstrap.json
i [ext]: Writing content to /build/temp/production/myApp/modern/slicer-temp/bootstrap.js
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]: Writing content to /build/production/myApp/generatedFiles/modern.json
i [ext]: Fashion build complete for /build/temp/production/myApp/modern/sass/myApp-all.scss
i [ext]: Fashion build completed in 5.557 sec.
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]: Writing content to /build/production/myApp/generatedFiles/modern.json
i [ext]: Writing content to /build/production/myApp/microloader.js
i [ext]: Appending content to /build/production/myApp/microloader.js
i [ext]: Writing content to /build/production/myApp/index.html
i [ext]:  [ERR] Warning: Nashorn engine is planned to be removed from a future JDK release
i [ext]: Ending production build for extjs

解决方法

我想跟进此事,因为前几天我有一个顿悟。对于我的家庭项目,当我开始使用开放式工具/ npm方法时,我意识到不必安装Java。在工作中,我们有一个在使用开放工具方法之前创建的项目,因此我们必须下载并安装需要Java的Sencha Cmd exe。

长话短说,我从工作计算机上卸载了Java,删除了node_modules目录和package-lock.json文件,然后重新运行npm安装。当我这样做时,我得到了一个全新的package-lock.json,并且该应用程序在没有Java的情况下构建/运行。我认为管道中有一些聪明人可以检查您是否安装了Java,如果安装了Java,则将获得完全不同的依赖关系。