- Install Jdbc Driver Mac Os X
- Oracle Jdbc Driver For Mac Os X
- Install Mysql Jdbc Driver Mac Os X
- Jdbc Driver Mysql
- Jdbc Driver Download
- Install the new driver package as described for a 'new install': Mount the disk image by double-clicking the filename.dmg file. In the Finder window, double-click the installDSDriver.sh file.
- Download the latest JDK 1.7 or 1.8 Mac OS X x64 package using the following command in Terminal. The path on your local file system to the Snowflake JDBC driver you downloaded in 'Install the Snowflake JDBC Driver,' above. Specify the version of the file you downloaded.
- May 20, 2004 hi guys, i'm trying to connect to a microsoft access db that i created on my mac via a java application.i know there is an ODBC manager tool in mac os x.but how do i get the drivers necessary drivers.
Purpose
The purpose of this page is to discuss using Xcode and JDBC with SQL Anywhere on Mac OS X.
Overview
This tutorial walks you through the creation of a simple Cocoa application with Xcode on Mac OS X. The application queries the Contact table of the Adaptive Server Anywhere sample database (asademo.db). It provides the ability to move through the contact table with a bi-directional cursor and save changes to Street and ZIP data.
Jun 27, 2011 I'm trying to install the jdbc driver on my Mac OS X Lion installation. I'm running JRE 1.6.026. I've downloaded postgresql-9.0-801.jdbc4.jar. Java -jar postgresql-9.0-801.jdbc4.jar. Which returns. Failed to load Main-Class manifest attribute from postgresql-9.0-801.jdbc4.jar. Any help trying to resolve this issue would be. Mac OS packages. PostgreSQL is the default database on macOS Server as of OS X Server version 10.7. MacOS without the macOS Server add-on installed includes only the PostgreSQL libpq shared library. MacOS Server 10.12 ships with PostgreSQL 9.4. Minor updates are provided by Apple, but not necessarily right after a new PostgreSQL minor release.
The tutorial does not teach JDBC or Java programming. There are many resources available on the web to assist you with these topics. Instead, it assists you in building an Xcode Cocoa Java project by putting together the required components within the IDE.
This tutorial is divided into two sections: one for using the iAnywhere JDBC driver, and one for using jConnect. In each section, instructions are provided for two versions of this tutorial: a quick start version that allows you to run the project right away, and a step-by-step version that takes you through the steps for creating a new Cocoa project.
Requirements
- SQL Anywhere Studio 9.0.1 for Mac OS X or later
- MAC OS X 10.3 or later
- Xcode version 1.1
Choosing a JDBC Driver
Adaptive Server Anywhere provides two JDBC drivers. Choose which one you wish to use in your application.
- iAnywhere JDBC Driver: This is a type 2 driver. It provides better performance than jConnect, but is not a pure Java driver. This driver is recommended for most applications that do not require a pure Java solution.
- jConnect: This is a type 4 pure Java driver and is recommended if you require a pure Java solution.
Building a Cocoa Project that Uses the iAnywhere JDBC Driver
Creating an ODBC Data Source
If you are using the iAnywhere JDBC driver, before you start the tutorials you must create an ODBC data source in order to connect to the Adaptive Server Anywhere sample database (asademo.db). The sample application relies on a data source named ASATutorial. The following instructions explain how to create this data source using an ODBC Administrator.
Before you can create an ODBC data source, you must first add the Adaptive Server Anywhere ODBC driver. If you have already done this, proceed to the steps on creating an ODBC data source.
Note: This document assumes you have installed SQL Anywhere Studio in the default directory (/Applications/SQLAnywhere16)
To Add the Adaptive Server Anywhere ODBC Driver
- Launch the ODBC Administrator from /Applications/Utilities.
- Select the Drivers tab.
- Click Add.
- In the Description field, type ASA 9.0 Driver.
- Click Browse and select the Adaptive Server Anywhere ODBC driver in both the Driver File Name and Setup File Name fields. By default, it is located in /Applications/SQLAnywhere9/System/lib/dbodbc9_r.bundle.
- Click OK.
Once you have added the Adaptive Server Anywhere ODBC driver, you can create an ODBC data source that will be used to connect to the database.
To Create an ODBC Data Source
- Launch the ODBC Administrator from /Applications/Utilities. The following figure illustrates the ODBC Administrator:
- In the ODBC Administrator, click the User DSN tab and then click Add.
- Choose the Adaptive Server Anywhere 9.0 driver from the list of available drivers. Click OK.
Type ASATutorial in the Data Source Name field and add the following connection parameters, as shown below. The connection parameters and values are case insensitive.
Keyword Value UID dba PWD sql START dbeng9 DBF /Applications/SQLAnywhere9/System/asademo.db ThreadManager ON - Click OK.
- Click Apply.
- Press Comand + Q to exit the ODBC Administrator.
Alternatively, you can add the information with a text editor. The ODBC configuration files are located in /Library/ODBC within your Home directory. There is an odbcinst.ini file for driver information and an odbc.ini file for data source information.
iAnywhere JDBC Driver Quick Start
The quick start version of the tutorial allows you to see the finished project before you complete the step-by-step tutorial.
- Open the Finder and navigate to /Applications/SQLAnywhere9/samples/asa/CocoaJava/ContactSample/JDBC.
- Copy the QuickStart directory to a temporary location, such as your Home directory.
- Open the QuickStart directory in the new location and double-click ContactSample.xcode.
- In Xcode, in the Groups and Files pane, expand Executables and then double-click ContactSample.
Click + under the Environment Variables heading and add the following environment variables, as shown below:
Environment Variable Value DYLD_LIBRARY_PATH /Applications/SQLAnywhere9/System/lib CLASSPATH /Applications/SQLAnywhere9/System/Java/jodbc.jar - Click the Build and Go button or press Command+R to run the project. The Contact Management application appears.
- Click Connect to connect the sample application to the database.
Tutorial: Buildling a Cocoa Project that Uses the iAnywhere JDBC Driver
This tutorial assumes you have installed SQL Anywhere Studio in the following loation: /Applications/SQLAnywhere9.
Creating a New Project in Xcode
- Start Xcode. In the Finder, go to /Developer/Applications/Xcode and then double-click Xcode.
- Create a new project. From the Xcode File menu, choose New Project. The New Project dialog appears.
- Choose Application ä Cocoa-Java Application.
- Type ContactSampleJava as the name of the project and save it in the directory shown below.
- Click Finish.
Adding Classes to the Project
- In the Finder, drag and drop the JDBCController.java file (located in /Applications/SQLAnywhere9/samples/asa/CocoaJava/ContactSample/Tutorial/src) into the Classes group in the left pane of Xcode. When prompted, select the Copy Items into Destination Group’s Folder option and then click Add.
- Edit the code to use the iAnywhere JDBC driver. Search the code for 2) to find the iAnywhere JDBC entries and uncomment them. There are two lines for the iAnywhere JDBC driver and they should appear as follows once you have uncommented them:
String connStr = 'jdbc:odbc:dsn=ASATutorial';
...
Class.forName( 'com.ianywhere.ml.jdbcodbc.IDriver' );
Note: The project files installed with Adaptive Server Anywhere are read-only. Xcode will prompt you when you edit the file. Click Edit Anyway when Xcode prompts you. - Save the project.
Install Jdbc Driver Mac Os X
Adding Resources to the Project
Adding the UI to the Project
- In the Finder, navigate to /Applications/SQLAnywhere9/samples/asa/CocoaJava/ContactSample/Tutorial/src, Option-click the directory English.lproj, and then drag and drop it into your local
copy of the ContactSampleJava project in the Finder. When you are prompted, choose to replace the existing files. - In Xcode, save the project.
Adding the JDBC Driver to the Project
- In the left pane of Xcode, expand the ContactSample group.
- In the left pane, select the Resources group.
- From the Xcode Project menu, choose Add Files. A new Finder window appears.
- Browse to /Applications/SQLAnywhere9/System/java/jodbc.jar and click Add.
- Click Add to add the iAnywhere JDBC driver to the target.
Configuring the Target
Adding Runtime Environment Variables to the Project
- In Xcode, expand the Targets group.
- In the left pane of Xcode, double-click Executables.
Click + under the Environment Variables heading and add the following environment variables, setting them to the appropriate installation directory for your environment (the table below uses the default installation directory):
Environment Variable Value DYLD_LIBRARY_PATH /Applications/SQLAnywhere9/System/lib CLASSPATH /Applications/SQLAnywhere9/System/java/jodbc.jar The DYLD_LIBRARY_PATH environment variable is used to locate the native libraries, while CLASSPATH environment variable is used to locate the Java classes.
Buidling and Running the Project
From the Build menu, choose Build and Go to start the application.
Click Connect. The Contact Management application appears:
Tutorial: Building a Cocoa Project that Uses jConnect
Adaptive Server Anywhere includes a quick start version of this tutorial that allows you to see the finished project before you complete the step-by-step tutorial, or you can proceed directly to the step-by-step tutorial if you wish.
Note: This document assumes you have installed SQL Anywhere Studio in the default directory (/Applications/SQLAnywhere9).
jConnect Quick Start
The quick start version of this tutorial allows you to see the finished project before you complete the step-by-step tutorial.
To Run the Quick Start Version of the jConnect Tutorial
- Open the Finder and navigate to /Applications/SQLAnywhere9/samples/asa/CocoaJava/ContactSample/jConnect.
- Copy the QuickStart directory to a temporary location, such as your Home directory.
- Open the QuickStart directory in the new location and double-click ContactSample.xcode.
- Pre-start the database server.
- In the Finder, navigate to /Applications/SQLAnywhere9.
- Double-click DBLauncher.
- When you are prompted for server options, type the following in the Database text box: /Applications/SQLAnywhere9/System/asademo.db.
- Click the Build and Go button or press Command+R to run the project. The Contact Management application appears.
- Click Connect to connect the sample application to the database.
Building a Cocoa Project that Uses jConnect
This tutorial shows you how to create a Cocoa project that accesses the Adaptive Server Anywhere sample database using jConnect.
The complete code for this project is located in /Applications/SQLAnywhere9/samples/asa/CocoaJava/ContactSample/jConnect.
Oracle Jdbc Driver For Mac Os X
Creating a New Cocoa Java Project
- Start Xcode. In the Finder, go to /Developer/Applications/Xcode and then double-click Xcode.
- Create a new project. From the Xcode File menu, choose New Project. The New Project dialog appears.
- Choose Application > Cocoa-Java Application.
- Type ContactSampleJava as the name of the project and save it in the /ContactSampleJava/jConnect directory as shown below.
- Click Finish.
Adding Classes to the Project
- In the Finder, drag and drop the JDBCController.java file (located in /Applications/SQLAnywhere9/samples/asa/CocoaJava/ContactSample/Tutorial/src) into the Classes group in the left pane of Xcode. When prompted, select the Copy Items into Destination Group’s Folder option and then click Add.
- Edit the code to use jConnect. Search the code for 1) to find the jConnect entries and uncomment them. There are two lines for jConnect and they should appear as follows once you have uncommented them:
String connStr = 'jdbc:sybase:Tds:localhost:2638';
...
Class.forName( 'com.sybase.jdbc2.jdbc.SybDriver' );
Note: The project files installed with Adaptive Server Anywhere are read-only. Xcode will prompt you when you edit the file. Click Edit Anyway when Xcode prompts you. - Save the project.
Adding the UI to the Project
The files provided for this tutorial include a UI for the sample application that you can drag and drop into the project from the Finder.
- In the Finder, navigate to /Applications/SQLAnywhere9/samples/asa/CocoaJava/ContactSample/Tutorial/src, Option-click the directory English.lproj, and then drag and drop it into your local
copy of the ContactSampleJava project in the Finder. When you are prompted, choose to replace the existing files. - In Xcode, save the project.
Adding the JDBC Driver to the Project
- In the left pane of Xcode, expand the ContactSample group.
- In the left pane, select the Resources group.
- From the Xcode Project menu, choose Add Files. A new Finder window appears.
- In the Finder, select /Applications/SQLAnywhere9/System/shared/jConnect-5_5/classes/jconn2.jar from your SQL Anywhere installation and click Add.
Click Add to add the JDBC driver to the target.
Save the project.
Configuring the Target
- In the left pane of Xcode, expand the Targets group.
- Double-click ContactSampleJava. In the left pane of the new window, expand Build Phases.
- In the left pane, double-click Frameworks & Libraries.
- In the right pane, select the Merge option for the jconn2.jar file as follows:
Building and Running the Project
- Pre-start the database server.
- In the Finder, navigate to /Applications/SQLAnywhere9.
- Double-click DBLauncher.
- When you are prompted for server options, type the following in the Database text box: /Applications/SQLAnywhere9/System/asademo.db.
- Click the Build and Go button or press Command+R to run the project. The Contact Management application appears.
- Click Connect to connect the sample application to the database.
Install Mysql Jdbc Driver Mac Os X
Related Documents
Related SAP Notes/KBAs
Available Categories Select a category to browse . | ||
Administrative | Connection Type | Content type |
Operating System | Platform | Products |
Jdbc Driver Mysql
Jdbc Driver Download
|