默认
发表评论 10
想开发IM:买成品怕坑?租第3方怕贵?找开源自已撸?尽量别走弯路了... 找站长给点建议
[已解决] 求助MobileIMSDK Java客户端Demo在JDK17上启动报错
阅读(49404) | 评论(10 收藏 淘帖1
Exception in thread "main" java.lang.IllegalAccessError: superclass access check failed: class org.jb2011.lnf.beautyeye.BeautyEyeLookAndFeelWin (in unnamed module @0x2a742aa2) cannot access class com.sun.java.swing.plaf.windows.WindowsLookAndFeel (in module java.desktop) because module java.desktop does not export com.sun.java.swing.plaf.windows to unnamed module @0x2a742aa2
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:855)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:753)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:676)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:634)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
        at net.x52im.mobileimsdk.java.demo.Launch.initUserInterface(Launch.java:43)
        at net.x52im.mobileimsdk.java.demo.Launch.main(Launch.java:121)


即时通讯网 - 即时通讯开发者社区! 来源: - 即时通讯开发者社区!

上一篇:[已解决] MobileIMSDK的iOS端连上服务端,马上就断,发消息会报错下一篇:[已回复] MobileIMSDK实现的多端消息同步时,离线消息怎么处理好?

本帖已收录至以下技术专辑

推荐方案
评论 10
用的JDK是什么版本?
jdk17
需要用低版本的是吗?@JackJiang
引用:One 发表于 2021-10-11 15:56
需要用低版本的是吗?@JackJiang

是的,换回JDK8。

这个Java版Demo里,用的BeautyEye 这个Java Swing外观,最高支持版本是到jdk1.8的(),或者你换个系统默认外观。

这个BeautyEye 是我写的,很久没有根据JDK高版本进行升级了,因为Java Swing已经不再流行,我也懒得再玩它了
引用:JackJiang 发表于 2021-10-11 15:59
是的,换回JDK8。

这个Java版Demo里,用的BeautyEye  这个Java Swing外观,最高支持版本是到jdk1.8的 ...

ok,谢谢
引用:One 发表于 2021-10-11 16:01
ok,谢谢

不客气
C:\Users\zero>java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)


还是不行@JackJiang
我直接注释掉算了,可以用了。


引用:One 发表于 2021-10-11 16:10
C:%users\zero>java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_ ...

注释掉BeautyEye外观,用系统自带的外观就好了
通过增加以下代码解决;        
try {
            BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.osLookAndFeelDecorated;
            BeautyEyeLNFHelper.launchBeautyEyeLNF();
        } catch (IllegalAccessError e) {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }
想问下这个账号密码,还有超级管理的密码是什么,我输入不正确,会报错

12月 20, 2022 11:06:44 上午 com.alibaba.druid.pool.DruidDataSource info
信息: {dataSource-1} inited
空结果数据访问异常
org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
        at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71)
        at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:797)
        at dao.PersonDao.login(PersonDao.java:117)
        at view.LoginFrame.loginActionPerformed(LoginFrame.java:177)
        at view.LoginFrame$1.actionPerformed(LoginFrame.java:92)
        at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
        at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
        at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
        at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
        at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
        at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
        at java.desktop/java.awt.Component.processEvent(Component.java:6391)
        at java.desktop/java.awt.Container.processEvent(Container.java:2266)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
打赏楼主 ×
使用微信打赏! 使用支付宝打赏!

返回顶部