Bouncy castle Configuration for JDK 7

Bouncy castle Configuration for JDK 7

Download the JDK 7 first from official website.
The file name is jdk-7u65-macosx-x64.dmg right now, that is the latest version.

After Install that dmg file, then remove all the java command file in my current path
>sudo rm -fr /usr/bin/java*

Add these things to class path
export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
export PATH="$JAVA_HOME/bin:$PATH"

If we plan to rollback to jdk1.6, just find the first line, and change the version to -v 1.6.

Check the JAVA_HOME and java version
>echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home
>java -version java version "1.7.0_65" Java(TM) SE Runtime Environment (build 1.7.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

Do not forget to link java file again for eclipse and other IDE.
>sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java /usr/bin/java

But after change my jdk to 1.7, my grails test-app can not pass anymore.
Error Message
 should have failed with an exception of type com.digby.lmm.reports.exceptions.InvalidSpecificationException, instead got Exception java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile 

Solution:
There is some solutions in 
http://www.pongasoft.com/blog/yan/java/2013/03/31/how-to-fix-incompatibleclasschangeerror-with-groovy-on-jdk7/

But I do not think I will change codes.

By the way, the latest bouncy castle file is here: http://downloads.bouncycastle.org/java/bcprov-jdk15on-150.jar



References:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
http://www.pongasoft.com/blog/yan/java/2013/03/31/how-to-fix-incompatibleclasschangeerror-with-groovy-on-jdk7/


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值