![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
问题及解决
文章平均质量分 92
忧郁的小菜鸡
这个作者很懒,什么都没留下…
展开
-
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
报错:java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment] with root cause java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment at java.lang.Class.forName0(Native Method) at java.l原创 2020-12-16 16:58:44 · 1432 阅读 · 0 评论 -
File对象的一个隐式转换
简单说就是在 windows 下 new 一个File 对象时,若你传入的路径是 “/”,那么在 File 中就给你转成了"",存取到数据库后,若下次获取时,分割符要特别注意,具体可看我的debug,如下图:原创 2020-11-22 11:14:51 · 116 阅读 · 0 评论 -
关于 SimpleDateFormat 线程安全
在开发的额过程中突然遇到关于 SimpleDateFormat 线程安全的问题,在此记录一下:开始我并没有注意到 SimpleDateFormat 的线程安全问题,所以将它设置为类的共有属性,想着图个方便,懒得每次使用都要新建一个对象,于是我也就这么做了。因为是开发环境,最初的时候自己也没有察觉出什么异常,直到我的 web 前端使用each 方法,然后便出现了莫名的状况,后端的捕获的异常出现在 SimpleDateFormat 这儿。刚刚出现这个问题时,我没有在意,因为之前运行得好好的,这里应该没啥原创 2020-08-29 10:54:40 · 102 阅读 · 0 评论 -
Ajax 文件上传(前后端完整代码,注意修改文件保存路径\访问路径)
一、前端代码:① html 代码:注意:如需要选择多个文件,进行上传,Ⅰ、multiple=“multiple” 不能省 Ⅱ、选择时是 Ctrl + 你所要选择的文件,不要分多次进行,不然后面选择的文件将会覆盖前面所选的文件<input type="file" multiple="multiple" id="myFiles" style="width: 100px;height: 25px;"><input type="button" value="上传" id="upload原创 2020-07-25 11:32:31 · 3767 阅读 · 1 评论 -
jsp创建的map无法传到后端及解决
先说结论吧,通过 JSP 是无法直接使用map的(这里指的是 new Map()),但在 html 中是可以的在 HTML 中创建 map 并使用,如:但在 JSP 中使用这种方式创建的 map 传到后端,里面的内容竟然会没有,如:① JSP 页面代码为(此时后端接收到的 map 的 size 为0,也就是说内容没传过去): var condition = new Map(); condition.set( "page",page); condition.set原创 2020-07-24 19:07:46 · 876 阅读 · 0 评论 -
复制的路径就不会出错?——java.io.FileNotFoundException: F:\temporary\read.txt (文件名、目录名或卷标语法不正确。)
/** * A byte buffer. * 一个字节缓冲 * <p> This class defines six categories of operations upon * byte buffers: * 这个类在字节缓冲区中定义了六类操作: * * <li><p> Absolute and relative {@link #get() <i>get</i>} and * {@link #put(byte) &l原创 2020-07-17 11:33:21 · 159 阅读 · 0 评论