Dbviusalizer报错Java.lang.ClassCastException: javax.swing.KeyStroke cannot be cast to java.lang.Compar
来源:互联网 发布:淘宝上哪些正品书店 编辑:程序博客网 时间:2024/06/05 15:19
前几日重装系统,装了java8,今天运行DbVisualizer时,报Java.lang.ClassCastException: javax.swing.KeyStroke cannot be cast to java.lang.Comparable 这样的错误。真是怪事。我的DbVisualizer版本是7.0.5,好像是该版本不支持java8,只能在java6下运行,由于种种原因吧,不想升级。后来在官网上找到了答案,只要新建个DBVIS_JAVA_HOME环境变量,指定你想要的jre版本就可以了。正常运行,截图如下:
官网解释:http://confluence.dbvis.com/pages/viewpage.action?pageId=3146120
另:只有spring4以上才支持java8,所以系统装了java8后如果想正常运行spring4以下的程序,需要指定运行的jre版本,当然是8以下的。
原博客地址http://blog.csdn.net/tegwy/article/details/38584233,感谢原博主
===============================================================================================
我的版本也是7.0.5,昨天安装了JDK7,今天就报错了,如上配置
Windows/Unix/Linux:
- In the DbVisualizer installation directory there is an .install4j directory,
- In this directory create a file named pref_jre.cfg if it doesn't already exist,
- Open the file in a text editor,
- Add the complete path to the root directory for the Java installation you want to use.
Example: C:\Program Files\Java\jre7
An alternative solution is to set the DBVIS_JAVA_HOME environment variable to point to the root directory for the Java installation.
Example: DBVIS_JAVA_HOME=C:\Program Files\Java\jre7
Mac OS X:
On Mac OS X, this is the search order for Java when launching DbVisualizer:
- Java installed with DbVisualizer in DbVisualizer.app/Contents/PlugIns/jre.bundle
- Any installed Java (JRE) in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
- Last, it looks for a matching Java (JDK) version in /Library/Java/JavaVirtualMachines
If you want to use a different Java version, you must download and install the Java JDK for that version (there is no way to select a specific JRE version). The new JDK version is installed in /Library/Java/JavaVirtualMachines/.
Do as follows to change so that DbVisualizer use the new Java version:
- Open a Terminal window
- Execute: cd DbVisualizer.app/Contents
- If the PlugIns folder doesn't exist create it with: mkdir PlugIns
- Execute: cd Plugins
- If there is a jre.bundle link or folder in the PlugIns folder, rename it (for backup purposes) with: mv jre.bundle jre.bundle.ORG
- Create a symbolic link to the new Java version: ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk jre.bundle
- Start DbVisualizer. It now uses the Java version specified by the symbolic link
1、找到所在目录C:\Program Files\DbVisualizer-7.1.2\.install4j
2、新增文件(如果没有)
3、增加内容
DBVIS_JAVA_HOME=C:\Program Files\Java\jre7
4、运行成功
- Dbviusalizer报错Java.lang.ClassCastException: javax.swing.KeyStroke cannot be cast to java.lang.Compar
- mybatis报错java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
- java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to ]
- java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
- java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
- java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
- java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
- JSONObject.toBean 报java.lang.ClassCastException: java.lang.Class cannot be cast to **
- 报错java.lang.ClassCastException: XXXXXXX.Application cannot be cast to android.app.MyApplicati
- Spring报错:java.lang.ClassCastException: com.sun.proxy.$Proxy2 cannot be cast to *
- java.lang.ClassCastException: org.apache.taglibs.standard.tlv.JstlCoreTLV cannot be cast to javax.se
- java.lang.ClassCastException: de.odysseus.el.ExpressionFactoryImpl cannot be cast to javax.el.Expres
- java.lang.ClassCastException: libcore.net.http.HttpURLConnectionImpl cannot be cast to javax.net.ssl
- java.lang.ClassCastException: org.apache.taglibs.standard.tlv.JstlCoreTLV cannot be cast to javax.se
- java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.n
- java.lang.ClassCastException: $Proxy cannot be cast to
- java.lang.ClassCastException: android.app.Application cannot be cast to *****
- java.lang.ClassCastException: android.app.Application cannot be cast to *****
- 遇到文件对比工具禁止编辑该怎么办
- 弹性布局详解display:flex;
- Spark SQL 实现 group_concat
- Codevs 1159最大全0子矩阵
- delphi DCC32命令行方式编译delphi工程源码
- Dbviusalizer报错Java.lang.ClassCastException: javax.swing.KeyStroke cannot be cast to java.lang.Compar
- elasticsearch 重建索引 使用python迁移索引数据 reindex
- 把数组定义为类型
- mysql client
- JVisualVM 进行性能分析及调优
- 理解 JavaScript 中的 Function.prototype.bind
- 【第7周 项目1 - 建立顺序串的算法库】
- IOS下的 NSTimer与Run loop Modes
- java.lang解析Object类