我正在尝试使用此 java 库将表情符号转换为 html 十六进制:https ://github.com/vdurmont/emoji-java
(取自此处: http: //mvnrepository.com/artifact/com.vdurmont/emoji- java/3.1.0 )
emojiUtils = createObject( "java", "com.vdurmont.emoji.Emoji", "/componenti/jar/emoji-java-3.1.0.jar" );
var myTitle = privateFunctionGetTitle(); // for example
var cleanTitle = emojiUtils.getHtmlHexidecimal(myTitle);
但我收到此错误: No matching Method for getHtmlHexidecimal(string) found for com.vdurmont.emoji.Emoji
我尝试(用于调试) writeDump(emojiUtils);
我究竟做错了什么?
更新
我也试过这个:
EmojiParser = createObject( "java", "com.vdurmont.emoji.EmojiParser", "/componenti/jar/emoji-java-3.1.0.jar" );
writeDump(EmojiParser.parseToHtmlDecimal(titoloPagina));
但我得到:
lucee.runtime.exp.NativeException: Could not initialize class com.vdurmont.emoji.EmojiManager ... Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.vdurmont.emoji.EmojiManager ... 80 more
堆栈跟踪:https : //gist.githubusercontent.com/ivanionut/8f4e6e356c0b2c8474d21c52d796df3a/raw/5b23ba3ff5f7c930381a8109ea43e29042cc7813/StackTrace