[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

com.microsoft cannot be resolved to a type

Posted on 2006-05-11
6
Medium Priority
?
1,527 Views
Last Modified: 2012-08-13
Hi all:

I recently changed to a new PC and thus new eclipse installation. Now if I open my files with eclipse, there are error markings wherever I have:
new com.microsoft.jdbc.sqlserver.SQLServerDriver()

The words: "com.microsoft" got underlined
The error message is: "com.microsoft cannot be resolved to a type"

What do I do to resolve this? Thanks.
0
Comment
Question by:sdc248
6 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 16663044
You need to add the SQL Server driver jar to your build path
0
 
LVL 1

Expert Comment

by:olgavillamizar
ID: 16663063
you have to put into path the .jar (driver sql)
In eclipse you have to rigth click in the proyect and then properties/java build path/libraries and then you select the jar
0
 
LVL 92

Expert Comment

by:objects
ID: 16663176
> new com.microsoft.jdbc.sqlserver.SQLServerDriver()

that should be:

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

Then you won't get a compile error

to run it you actually need more than one jar

you can download the jars here
http://www.microsoft.com/downloads/details.aspx?FamilyID=07287b11-0502-461a-b138-2aa54bfdc03a&DisplayLang=en

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:sdc248
ID: 16663180
problem solved. Thanks.
0
 

Author Comment

by:sdc248
ID: 16663206
My old jars were located on C: of the old machine, thus the problem....
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16663274
:-)
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month19 days, 18 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question