Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cannot resolve symbol

843810Feb 4 2003 — edited Feb 6 2003
Hello,

I've got a problem. I'm getting the next error message:

C:\Documents and Settings\te Molder\Mijn documenten\HIO\PGO Netwerken\Projecten\Deel 4\4.5 Dump Utility\DumpUtility.java:12: cannot resolve symbol
symbol : method getConnection ()
location: class DumpUtility
Connection connection = getConnection();
^
1 error

This is my code:

import java.net.*;
import java.sql.*;
import java.io.*;
import java.util.*;

public class DumpUtility
{
public static void main(String args[])
{
try
{
Connection connection = getConnection();
.
.
etc.

I'm certain I've got the spelling right, I typed it directly from a tutorial book. I've imported everything it needs. My classpath has everything necessary as far as I can tell:

SET CLASSPATH = "C:\WINDOWS\System32\QTJava.zip";C:\j2sdk1.4.1;C:\j2sdk1.4.1\jre;.;C:\j2sdk1.4.1\jre\bin;C:\j2sdk1.4.1\jre\lib;C:\j2sdk1.4.1\lib;"C:\j2sdk1.4.1\HIO Libraries\gjt.jar";"C:\j2sdk1.4.1\HIO Libraries\nlhenict.jar"

I'm using the JDK 1.4.1, as you can see from the classpath, I'm using Windows XP, and it keeps giving the error that it doesn't know the getConnection() function from the java.sql package. I've checked the Javadocs to be certain, and in the documentation it too gives the getConnection() function. The sql package from what I've read is in the standard JDK. It's almost as if windows refuses to load the classes, and that's why it doesn't now the function it seems, even though it is in the classpath.

Anyone any idea what's wrong?

3D Master
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2003
Added on Feb 4 2003
4 comments
712 views