myeclipse 6.0.0.M1对sql server 2005 支持问题
1、MyEclipse启动用的jdk是1.5.0_11-b03.
2、使用MyEclipse配置sql server2005,只能用sqljdbc.jar,不能用sqljdbc4.jar ,如果用4.jar,那么配置不起来。
3、如果你将项目的jdk设置为jdk1.6,而不是用myeclipse自带的jdk,那么,访问sql server2005,会报错,说jdk1.6必须用sqljdbc4.jar。。。。。。。(当然,如果你坚持用老版本的jdk开发,就没问题)
解决办法:修改myeclipse的启动jdk:
1、将myeclipse目录下的jre目录重命名为jre1(或者其他随便啥名字,删掉也可以)
2、将其他地方安装的1.6的jre拷贝过来,比如:c:\jre1.6.0_03,然后把这个目录重命名为jre。
3、启动myeclipse,现在myeclipse本身运行jre就是1.6.0_03,然后修改windows-》preferences-》java-》installed jres,增加jdk1.6的jvm,并设置为默认jvm。
现在,再添加sql server的driver的时候,可以选择sqljdbc4.jar了(当然还有一点儿小的显示bug——那就是当你再次edit这个driver的时候,driver template是空的(及时你选择了sql server2005,保存了,下次进来还是空的。。。。。),不过不影响使用。
这个无法配置sqljdbc4.jar目前未在网络上发现解决方案,在myeclipse的官方论坛,只发现这样一个链接(请用代理访问该链接):http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=22810&start=0&postdays=0&postorder=asc&highlight=sql+server
原文如下:(1、网站未给出解决方案,2、说明7.0的MyEclipse还是用1.5的jre。。。。。。)
Registered Member
Joined: May 16, 2006
Posts: 5
Hi,
I've been trying to connect to a SQL Server 2005 DB through the explorer and I have not been able to do it. When I try to create a new connection, I get: Driver class not found.
I have add the jar when I'm trying to set up the connection, but I still get the error. Any advice you can provide would be greatly appreciated.
Thanks!
View user's profile Send private message
Reply with quote Back to top
support-nipun
Post subject: RE: Can PostPosted: Jan 28, 2009 - 04:31 PM
Registered Member
Registered Member
Joined: Apr 18, 2007
Posts: 7065
Can you send me a link to the jar that you are using. I would like to test this at my end as well.
Also, can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.
_________________
Nipun
MyEclipse Support
View user's profile Send private message Send e-mail
Reply with quote Back to top
NuAlphaMan
Post subject: RE: Can PostPosted: Jan 29, 2009 - 01:44 AM
Registered Member
Registered Member
Joined: May 16, 2006
Posts: 5
Here is the link:
http://msdn.microsoft.com/en-us/data/aa937724.aspx
I'm using the JDBC 2.0 Driver
*** Date:
Wednesday, January 28, 2009 8:41:41 PM EST
** System properties:
OS=WindowsVista
OS version=6.0.0
Java version=1.5.0_11
*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 7.0
Build id: 7.0-20081201
*** Eclipse details:
MyEclipse Enterprise Workbench
Version: 7.0
Build id: 7.0-20081201
Eclipse Platform
Version: 3.4.1.r341_v20080731-9I96EiDElYevwz-p1bP5z-NlAaP7vtX6Utotqsu
Build id: M20080911-1700
Eclipse Java Development Tools
Version: 3.4.1.r341_v20080709-0800-7o7tEAfEF_U5qyUgrb2HAp539P97
Build id: M20080709-0800
Eclipse Graphical Editing Framework GEF
Version: 3.4.1.v20080806-67718083A56B4H2A3213573
Build id: 200809101400
Eclipse RCP
Version: 3.4.100.r341_v20080814-989JESIEdAciFYfkZZsBfSwQ2341
Build id: M20080703-0800
Eclipse Plug-in Development Environment
Version: 3.4.1.r341_v20080731-7T7U0E9mlRIuGUYviF_VP
Build id: M20080703-0800
Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\Users\Bernie\AppData\Local\Genuitec\MyEclipse 7.0\myeclipse.exe
-name
Myeclipse
--launcher.library
C:\Users\Bernie\AppData\Local\Genuitec\MyEclipse 7.0\../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
-startup
C:\Users\Bernie\AppData\Local\Genuitec\MyEclipse 7.0\../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
-clean
-configuration
C:\Users\Bernie\AppData\Local\Genuitec\MyEclipse 7.0\configuration
-vm
C:\Users\Bernie\AppData\Local\Genuitec\Common\binary\com.sun.java.jre.win32.x86_1.5.0.011\bin\client\jvm.dll
View user's profile Send private message
Reply with quote Back to top
support-nipun
Post subject: RE: Can PostPosted: Jan 29, 2009 - 05:39 PM
Registered Member
Registered Member
Joined: Apr 18, 2007
Posts: 7065
I was unable to reproduce this issue using the JAR available at the link you provided above. Added the sqljdbc.jar.
Can you hit the pm button at the bottom of my post and send me a screenshot with the error showing up.
_________________
Nipun
MyEclipse Support
View user's profile Send private message Send e-mail
Reply with quote Back to top
NuAlphaMan
Post subject: RE: Can PostPosted: Jan 30, 2009 - 01:43 AM
Registered Member
Registered Member
Joined: May 16, 2006
Posts: 5
I switched to this jar and it's working. I was using the sqljdbc4.jar and it wouldn't work with that jar. Thanks.
View user's profile Send private message
Reply with quote Back to top
support-nipun
Post subject: RE: Can PostPosted: Jan 30, 2009 - 06:22 PM
Registered Member
Registered Member
Joined: Apr 18, 2007
Posts: 7065
Your welcome.
_________________
Nipun
MyEclipse Support