sdc248
asked on
com.microsoft cannot be resolved to a type
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.sqlserv er.SQLServ erDriver()
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.
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.sqlserv
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> new com.microsoft.jdbc.sqlserv er.SQLServ erDriver()
that should be:
Class.forName("com.microso ft.jdbc.sq lserver.SQ LServerDri ver");
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
that should be:
Class.forName("com.microso
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
ASKER
problem solved. Thanks.
ASKER
My old jars were located on C: of the old machine, thus the problem....
:-)
In eclipse you have to rigth click in the proyect and then properties/java build path/libraries and then you select the jar