Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3271340
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:43:09+00:00 2026-05-17T18:43:09+00:00

On OS X. $ java -version java version 1.6.0_20 Java(TM) SE Runtime Environment (build

  • 0

On OS X.

$ java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)

Here’s my whole project:

$ ll
total 1072
-rw-r--r--  1 ethan  ethan    1316 Oct 19 17:17 BlackberryDataExtractor.class
-rw-r--r--  1 ethan  ethan    1439 Oct 19 18:05 BlackberryDataExtractor.java
-rw-r--r--@ 1 ethan  ethan  537303 Apr 19  2010 sqljdbc4.jar
                                                    <-- MS SQL Server JDBC driver

Here’s BlackberryDataExtractor.java. It doesn’t really do anything yet. I’m just trying to get basic stuff working like DB connection:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import com.microsoft.sqlserver.jdbc;

class BlackberryDataExtractor {

  public static void main(String[] args) {
    Connection con = BlackberryDataExtractor.getConnection();
  }

  public static final Connection getConnection()
  {
    Connection con = null;
    try
    {
      Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
      con = DriverManager.getConnection("jdbc:sqlserver://[ etc... ]");
      String SQL = "SELECT uc.MailboxSMTPAddr AS email, sd.PhoneNumber AS phone_number"
        + "FROM dbo.UserConfig uc, dbo.SyncDeviceMgmtSummary sd"
        + "WHERE sd.UserConfigId = uc.Id";
      Statement stmt = con.createStatement();
      ResultSet rs = stmt.executeQuery(SQL);

      while (rs.next()) {
        System.out.println(rs.getString("email") + ", " + rs.getString("phone_number"));
      }
      rs.close();
      stmt.close();

    }
    catch(SQLException e)
    {
      e.printStackTrace();
    }
    catch(ClassNotFoundException e)
    {
      e.printStackTrace();
    }
    return con;
  }
}

It won’t compile. Here’s the error:

$ javac -cp "$CLASSPATH;*.jar" BlackberryDataExtractor.java
BlackberryDataExtractor.java:4: package com.microsoft.sqlserver does not exist
import com.microsoft.sqlserver.jdbc;
                              ^
BlackberryDataExtractor.java:23: cannot find symbol
symbol  : class Statement
location: class BlackberryDataExtractor
      Statement stmt = con.createStatement();
      ^
BlackberryDataExtractor.java:24: cannot find symbol
symbol  : class ResultSet
location: class BlackberryDataExtractor
      ResultSet rs = stmt.executeQuery(SQL);
      ^
3 errors
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:43:10+00:00Added an answer on May 17, 2026 at 6:43 pm

    javac does not understand wildcards like *.jar. You have to be explicit.

    Try javac -cp "$CLASSPATH;sqljdbc4.jar" ...

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code is not compiling in Java: java version 1.6.0_24 OpenJDK Runtime Environment
I'm trying to run ActiveMQ on Mac OSX 10.5.7. I have Java version 1.5.0_19
I installed/uninstalled java jre/jdk now many times and finally installed the older version 1.6.0_17
Interested in upgrading JAVA VERSION from JAVA 1.5 to JAVA 1.6 [oracle@server301 /]$ java
is there a Java version of the PHP function checkdnsrr ?
I am using the Java version of the Google App Engine. I would like
I need to setup NACHOS java version in Linux and run some simple sample
I'm working on a Java version of MS Paint. You can see what it
I am using an API which provides a Java version but not a Python
Do I have the 64 bit of JDK installed on my machine? My java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.