- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
您好,我们正在生成一个桌面应用程序。在我们的项目中,我们需要使用 javax.swing.ImageIcon,如果服务器请求,我们需要发送此对象。这里的问题是,如果我们在两个环境中使用相同的 JRE,则它工作正常,如果不是,我们将得到 java.io.InvalidClassException: javax.swing.ImageIcon;本地类不兼容:流classdesc serialVersionUID = -962022720109015502,本地类serialVersionUID = 532615968316031794 是否有任何解决方案可以避免这种情况,任何建议表示赞赏。提前致谢
for this what I've done is, I just got ImageIcon.java file and removed the package by using my own package. Here I've hardcoded serialversionuid, is this recommended...?
最佳答案
Javadoc javax.swing.ImageIcon
包含:
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see java.beans.XMLEncoder.
正如建议的那样,您应该尝试使用 java.beans.XMLEncoder
(和 java.beans.XMLDecoder
)而不是序列化。
关于java - 面临serialversionuid 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18782275/
我正在安装一个 react-app 并面临一些问题。我试图通过删除 /node-modules 来修复它并重新安装,但它仍然给我一些问题。我是一个 ubuntu 用户。请帮我解决一下这个。这是错误日志
首先,我是 C 的初学者,所以如果我的问题看起来很愚蠢,我很抱歉。 我正在学习如何在 C 中使用冒泡排序算法,我通过以下代码: #include int main() { int ctr,
我正在使用 HtmlUnitDriver 打开链接。这是我的代码: HtmlUnitDriver webDriver = new HtmlUnitDriver(); webDriver.get("so
我是 Camel 新手,我已经为分离器编写了代码。我编写了一个 context.xml,其中包含用于映射 POJO 的路由和 Bean,以及一个 FileSplitter.java 文件,其中包含以下
我不断收到错误:TestException.java:8: 错误: 未报告的异常 Throwable;必须被捕获或宣布被抛出 throw new ParentException().initCause
您能看一下this demo吗?让我知道为什么我无法定位所选 anchor 链接的下一个和上一个 section 的 id? 为了获得下一个,我尝试了所有 var target = $(this).
我正在为我们使用 asp.Net MVC 的应用程序尝试 JqGrid。我无法获得数据显示。我不确定是什么问题。 这是我的查看代码: @{ ViewBag.Title = "Sea
我想将网页显示为模式弹出窗口。 Response.Write("detailedresults=window.showModalDialog('NewFile.aspx','Data','left=(
当我尝试从不同域下载视频时,遇到 CORS 错误。我尝试了很多方法来解决它但无法解决。下面是我的js代码。 getVideoFile = function () { var xhr = new XML
我的 ADF Web 应用程序面临兼容性问题。尝试添加元标记 - ' '甚至尝试注入(inject)java脚本来抑制兼容性问题,但没有任何反射(reflect)。下面是java脚本- ` var
在这个项目中,我遇到了一些运行时错误,我厌倦了通过将错误粘贴到谷歌中来解决它并为此获得适当的结果。但是我无法解决这个问题, 和其他代码很好但是 list 文件显示了一些警告。代码是 `
我实现了一个具有三个选项卡的 TabLayout。当我滑动页面时一切正常,当我只使用标签点击来导航时它也有效。但是,当我滑动页面并单击任何先前选择的选项卡时,问题就出现了,只有选项卡指示器更改为新选项
我想要达到的目标:尝试将数据从我的应用程序字段发送到我在 WebAppServer 上的 Servlet。 我面临 ClassCastException 问题,我尝试实现我在相关讨论中在 StackO
JavaScript 代码: if (document.getElementsByClassName('chkaddress').checked) { $('#DivCommunication
我正在尝试使用 Hazelcast 来使用 SqlPredicate。代码片段: private void testHazelCast() { HazelcastInstance ha
当我从服务器访问图像时,收到 403 禁止错误。 如果我访问音频文件,那么我不会收到任何错误。但如果我正在访问图像文件,那么只有我面临这个问题。 请注意,音频文件的权限是0644,图像的权限也具有相同
我想像sql中的通配符搜索一样执行查询。所以我在nodejs和mongoose中使用正则表达式。当我使用硬代码时它可以工作,但是当我放入变量时它就不起作用。问题出在哪里。 硬代码代码 AlertMod
我正在尝试将 BottomNavigationView 与导航编辑器一起使用。我已经按照给定的方式实现了所有内容,但只显示主页,当我更改选项卡时,它不会更改 fragment 。 这是主要的 Acti
这个问题在这里已经有了答案: Enzyme: simple .to.have not working (1 个回答) 10 个月前关闭。 我有一个组件app.tsx import React, { u
我有多个选项卡(A、B、C),并且在加载“C”选项卡时,模型属性应数据绑定(bind)到选项卡“c”。我面临数据绑定(bind)问题。 三个选项卡(A、B、C)位于另一个 View View A 内。
我是一名优秀的程序员,十分优秀!