JDBC $CLASSPATH xcode and javac please help!

Discussion in 'Mac Programming' started by m3the01, Jun 26, 2007.

  1. macrumors member

    Jun 18, 2007
    Hey thanks for the read and hopefully the help, lol

    Anyway ive downloaded the files nls_charset11.jar/zip and classes111.jar/zip from oracle and followed the direction to the best of my knowledge.

    Here is my echoed class path
    echo $CLASSPATH

    Ive also tried a .zip variation of the above command as i have it working in my linux box.

    Here is the method making the call and causing the error,
    *Check to see if Oracle Drivers are currently available
    *If it is available it wont exit the application
    private void oracleDriverCheck() {
    }catch(ClassNotFoundException e){
    JOptionPane.showMessageDialog(null, "DatabaseConnectionManager:OracleDriverCheck:\nError: " + e.getMessage(),
    "Error", JOptionPane.ERROR_MESSAGE);

    Obviously the error is coming up,

    How to add these files to my xcode project?

    Also how to set the classpath up correctly under osx?

    I resorted to the unintuitive lazy man's approach after 2 hours of trying to get this to work of just shoving the two .jar files in the

    This makes both xcode and javac work perfectly, however i understand this is not the correct method to do this and would like to correctly add the jar files to xcode java applet project and setting the classpath correctly so when i use javac -classpath $CLASSPATH *.java

    works correctly.


    Sorry for the long post
  2. thread starter macrumors member

    Jun 18, 2007
    PS it works perfectly under javac now,

    javac *.java
    java -classpath $CLASSPATH mainapp

    Had the classpath under the wrong command,

    However still cant get it to go under xcode, i attempted to add the paths in xcode through 'project->edit active target appname->searchpaths'

    But no luck:-(


Share This Page