Java 9 javapacker在创建bss时找不到jfxrt.jar。似乎在“createbss”中完全被打破了Linux下的模式。如何避免这个bug? [英] Java 9 javapacker can't find jfxrt.jar while creating bss'. Seems totally broken in "createbss" mode under Linux. How to avoid the bug?

查看:194
本文介绍了Java 9 javapacker在创建bss时找不到jfxrt.jar。似乎在“createbss”中完全被打破了Linux下的模式。如何避免这个bug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用Sun JDE 9.0.1的Ubuntu Linux系统,我需要将一些Fx的CSS文件从控制台转换为二进制形式。
但是当我执行命令时:

I have Ubuntu Linux system with Sun JDE 9.0.1 and I need to convert some of Fx's CSS files to binary form from console. But when I execute the command:

javapackager  -createbss -outdir . -srcdir .

我收到错误:


错误:jfxrt.jar需要在-createbss的classpath和
-createJar中没有-nocss2bin

Error: jfxrt.jar needs to be on classpath for -createbss and for -createJar without -nocss2bin

我的JDK已正确安装。我有所有必要的模块(包括FX)。
我有什么想法可以避免一个愚蠢的错误,我让打包机去做它的工作?
如果我从/ usr / lib / jvm / java-9-oracle / jmods目录运行javapackager,它就会完成而不会出错。所以现在我正在使用一个丑陋的修复程序,搜索模块目录,使其成为当前,从那里运行打包程序。但那太可怕了。
javapackager不接受任何其他参数,但outdir,srcdir和srcfiles,所以我不能强制加载或查看jfx模块的路径。但是可能有一些环境变量的技巧或可以使修复不那么难看的东西吗?

My JDK is properly installed. I have all necessary modules (including FX). Any ideas how I can avoid a stupid bug and I make the packager to do it's job? If I run javapackager from "/usr/lib/jvm/java-9-oracle/jmods" directory it completes without error. So right now I am using an ugly fix, search the modules directory, make it current, run packager from there. But that's damn ugly. javapackager doesn't accept any other parameters but outdir, srcdir and srcfiles so I can't force loading or looking path for the jfx module. But may there is some trick with environment variables or something that can make the fix less ugly?

P.S。从jmod目录运行或从参数中删除-srcdir消除了错误,但打包程序不生成任何输出文件(即使我使用-srcfiles指定输入文件)。似乎javapackager在createbss模式下完全被破坏了。是否有人在Java 9中使用它?

P.S. Running from jmod directory or removing "-srcdir" from the parameters eliminates the error, but the packager doesn't generate any output files (even if I specify input files with "-srcfiles"). Seems as javapackager is completely broken in createbss mode. Does anyone use it with Java 9?

推荐答案

我已经检查了源代码 - 来自JDK 9.0.1的javapackager完全坏了!使用来自Java 8的可执行文件。我向Oracle填写了一个错误报告,突然间他们非常惊讶(没有人注意到核心工具的基本功能之一已经坏了?!)。

I've checked the sources - javapackager from JDK 9.0.1 is totally broken! Use executable file from Java 8. I filled out a bug report to Oracle and all of a sudden they were very surprised (nobody noticed that one of the basic function ot a core tool is broken yet?!).

临时解决方案:使用JDK 1.8中的javapackaged工具。您所需要的只是可执行文件本身,您可以放在任何地方。我把它直接放到我的项目树(在tools目录下)并从建筑脚本调用。警告!仅使用此替换的可执行文件createbss!使用常规的所有其他东西!

TEMPORARY SOLUTION: Use the javapackaged tool from JDK 1.8. All you need is the executable itself and you can put at any place. I put it right into my project tree (under "tools" directory) and call from a building script. WARNING! Use this replaced executable for "createbss" ONLY! Use the regular one for all other things!

这篇关于Java 9 javapacker在创建bss时找不到jfxrt.jar。似乎在“createbss”中完全被打破了Linux下的模式。如何避免这个bug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆