当前位置: 技术问答>java相关
Jbuilder8试用物体(欢迎prosong来取分)
来源: 互联网 发布时间:2017-03-24
本文导语: 用 jb 8 在用jsp wizzard生成jsp后保存的时候出现问题: Could NOT save file "jsp1.jsp" com.borland.primetime.util.AssertionException:gbk 后台报错如下: Disabling offscreen DirectDraw acceleration com.borland.primetime.util.AssertionExcep...
用 jb 8 在用jsp wizzard生成jsp后保存的时候出现问题:
Could NOT save file "jsp1.jsp" com.borland.primetime.util.AssertionException:gbk
后台报错如下:
Disabling offscreen DirectDraw acceleration
com.borland.primetime.util.AssertionException: gbk
at com.borland.primetime.viewer.hb.getBufferContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.updateContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.getContent(Unknown Source)
at com.borland.jbuilder.node.html.HTMLStructure.updateStructure(Unknown
Source)
at com.borland.primetime.node.TextStructure.updateStructureQuickly(Unkno
wn Source)
at com.borland.primetime.viewer.jb.actionPerformed(Unknown Source)
at javax.swing.Timer.fireActionPerformed(Timer.java:271)
at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
com.borland.primetime.util.AssertionException: gbk
at com.borland.primetime.viewer.hb.getBufferContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.updateContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.getContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.save(Unknown Source)
at com.borland.primetime.node.FileNode.save(Unknown Source)
at com.borland.primetime.ide.Browser.doSave(Unknown Source)
at com.borland.primetime.ide.Browser.doSave(Unknown Source)
at com.borland.primetime.ide.Browser.doSaveAll(Unknown Source)
at com.borland.primetime.ide.Browser.doSaveAll(Unknown Source)
at com.borland.primetime.ide.hh.actionPerformed(Unknown Source)
at com.borland.primetime.ide.BrowserAction.actionPerformed(Unknown Sourc
e)
at com.borland.primetime.actions.ActionButton.a(Unknown Source)
at com.borland.primetime.actions.ActionButton.fire(Unknown Source)
at com.borland.primetime.actions.ActionButton.processMouseEvent(Unknown
Source)
at java.awt.Component.processEvent(Component.java:4890)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1585)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
com.borland.primetime.util.AssertionException: gbk
at com.borland.primetime.viewer.hb.getBufferContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.updateContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.getContent(Unknown Source)
at com.borland.jbuilder.node.html.HTMLStructure.updateStructure(Unknown
Source)
at com.borland.primetime.node.TextStructure.updateStructureQuickly(Unkno
wn Source)
at com.borland.primetime.viewer.jb.actionPerformed(Unknown Source)
at javax.swing.Timer.fireActionPerformed(Timer.java:271)
at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Could NOT save file "jsp1.jsp" com.borland.primetime.util.AssertionException:gbk
后台报错如下:
Disabling offscreen DirectDraw acceleration
com.borland.primetime.util.AssertionException: gbk
at com.borland.primetime.viewer.hb.getBufferContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.updateContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.getContent(Unknown Source)
at com.borland.jbuilder.node.html.HTMLStructure.updateStructure(Unknown
Source)
at com.borland.primetime.node.TextStructure.updateStructureQuickly(Unkno
wn Source)
at com.borland.primetime.viewer.jb.actionPerformed(Unknown Source)
at javax.swing.Timer.fireActionPerformed(Timer.java:271)
at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
com.borland.primetime.util.AssertionException: gbk
at com.borland.primetime.viewer.hb.getBufferContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.updateContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.getContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.save(Unknown Source)
at com.borland.primetime.node.FileNode.save(Unknown Source)
at com.borland.primetime.ide.Browser.doSave(Unknown Source)
at com.borland.primetime.ide.Browser.doSave(Unknown Source)
at com.borland.primetime.ide.Browser.doSaveAll(Unknown Source)
at com.borland.primetime.ide.Browser.doSaveAll(Unknown Source)
at com.borland.primetime.ide.hh.actionPerformed(Unknown Source)
at com.borland.primetime.ide.BrowserAction.actionPerformed(Unknown Sourc
e)
at com.borland.primetime.actions.ActionButton.a(Unknown Source)
at com.borland.primetime.actions.ActionButton.fire(Unknown Source)
at com.borland.primetime.actions.ActionButton.processMouseEvent(Unknown
Source)
at java.awt.Component.processEvent(Component.java:4890)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1585)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
com.borland.primetime.util.AssertionException: gbk
at com.borland.primetime.viewer.hb.getBufferContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.updateContent(Unknown Source)
at com.borland.primetime.vfs.Buffer.getContent(Unknown Source)
at com.borland.jbuilder.node.html.HTMLStructure.updateStructure(Unknown
Source)
at com.borland.primetime.node.TextStructure.updateStructureQuickly(Unkno
wn Source)
at com.borland.primetime.viewer.jb.actionPerformed(Unknown Source)
at javax.swing.Timer.fireActionPerformed(Timer.java:271)
at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
|
问题应该归因于 Borland, 是由于他们使用了非标准的 sun.io.*包.
在这个包中的Char2Byte* 与 Byte2Char* 类就是字符集与 byte 相互转换的 class, 处理类名与字符集映射关系的就是 sun.io.CharacterEncoding 类,反编译可以看到 一个大的 HashMap, 就是对应关系.这个类默认不支持小写的 gbk( 可能是由于 GBK 不是国家标准)。 解决方法也简单,加入 gbk 的支持就行了,往 CharacterEncoding 加入一行
((HashMap)obj).put("gbk", "GBK")
就搞定了。(GBK 的支持类在 charsets.jar 包中)
注意:
将其编译之后一定要放回到 JBuilder 使用的 jdk 下的 rt.jar 中,否则可能不起作用。
在这个包中的Char2Byte* 与 Byte2Char* 类就是字符集与 byte 相互转换的 class, 处理类名与字符集映射关系的就是 sun.io.CharacterEncoding 类,反编译可以看到 一个大的 HashMap, 就是对应关系.这个类默认不支持小写的 gbk( 可能是由于 GBK 不是国家标准)。 解决方法也简单,加入 gbk 的支持就行了,往 CharacterEncoding 加入一行
((HashMap)obj).put("gbk", "GBK")
就搞定了。(GBK 的支持类在 charsets.jar 包中)
注意:
将其编译之后一定要放回到 JBuilder 使用的 jdk 下的 rt.jar 中,否则可能不起作用。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。