Java and oracle in linux

hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
thnx in advance..

884540 wrote:
hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
thnx in advance..You can mention the classpath using the javac and java options:
javac -cp .;<path> <ClassName>.java
and
java -cp .;<path> <ClassName>
Or refer the below link to avoid mentioning classpath everytime you run/ compile the program
http://www.linuxquestions.org/questions/linux-software-2/j2sdk-install-174483/#post898715

Similar Messages

  • How to relate java and Oracle

    i have to tried to make programs using java and oracle. if i give the values in the 'insert' statement it is getting updated in the original table in oracle but how to take the values from the text fields of java and insert into the tables in oracle. do we have any methods to convert the values into sql type. pl reply.

    Here is a sample of a Java program that uses JDBC and a PreparedStatement. This particular program does a select, but you can also use this for inserts. I'm not 100% this is what you are looking for, but if it isn't just let me know. I'll help if I can.
    Joel
    For inserts, just replace this code:
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
      System.out.println(rs.getInt(rs.findColumn("CNT")));
    }with this code (and obviously change the Select string to an Insert String):
    int rowcnt = ps.executeUpdate();Here is the whole program:
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    class dbtest {
        public static void main(String args[]) throws SQLException {
            try {
                String timeString = new String("2000-11-01 23:59:59");
                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd H:m:s");
                java.util.Date date = format.parse(timeString);
                Timestamp timestamp = new Timestamp(date.getTime());
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn =
                    DriverManager.getConnection(
                        "jdbc:oracle:thin:@riker:1521:mydb",
                        "myusername",
                        "mypassword");
                String sql =
                    "SELECT COUNT(*) CNT FROM SERVICE_ALARM "
                        + "WHERE TRANS_STREAM_NODE_ID = ? "
                        + "AND SERVICE_ID = ? "
                        + "AND ALARM_ID = ? "
                        + "AND RAISED > TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, "ROW1");
                ps.setInt(2, 1);
                ps.setString(3, "ROW1");
                String myDate =
                    timestamp.toString().substring(0, timestamp.toString().length() - 2);
                System.out.println("myDate=(" + myDate + ")");
                ps.setString(4, myDate);
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    System.out.println(rs.getInt(rs.findColumn("CNT")));
                rs.close();
                ps.close();
            } catch (Exception e) {
                System.out.println("Java Exception caught, error message=" + e.getMessage());
    }

  • Webdynpro java and oracle DB connection..

    Hi,
    I have a good knowledge of WD (web dynpro java) projects having ECC as backend as i have done lot of projects where ECC is backend and WD JAVA is front end.
    but in my new project i have wd java as front end but my backend is oracle DB. I want to know how to create/setup  connection betwen webdynpro java and oracle DB, how to proceed on this ? wat all settings I have to do in VA (visual admin) and all.
    please let me know how to proceed on this. Any document/tutorial on this will be very helpful..

    Hi Rahul,
    Create a DataSource to the oracle db in Visual Admin, give the datasource an alias name and connect to the db from WebDynpro by calling the alias name.
    These document might be useful:
    [http://help.sap.com/saphelp_nw70/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm]
    [SAP Note 867176|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=867176]
    [SAP Note 941594|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=0000941594&nlang=E]
    Good luck!
    Regards,
    Aditya

  • Relation between java and oracle

    Hi,
    This is general information about java and oracle.
    I had worked in java last one year, but now switch to oracle i heared that nearly combination of each are implemented oops concept. But i know where it used in java, not in oracle.
    In oracle, where we are implemented inheritance, polymorhism and encapsulation.
    plz give some tips
    Regards venki

    does this mean you used to develop your applications on java and manuplate your data in Oracle over JDBC or Hibernate but then you started to develop PL/SQL applications for this need and use PL/SQL's OO features?
    With my experiences I may say if you are working on data intensive database applications learning how to use effectively SQL and PL/SQL is critical, this is Oracle's native language not something written to work for any database vendor. http://www.oracle.com/pls/db102/portal.portal_db?selected=5

  • Oracle 10g release 2 and Oracle Unbreakable Linux 5

    Hello, I tried to install Oracle (Oracle Database 10g Release 2 (10.2.0.1.0) for Linux x86-64) into the last oracle linux distribution. I have problems with the installation process:
    @SRVAXILAB072 database]$ ./runInstaller
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
    Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-08-16_09-05-34PM. Please wait ...[oracle@SRVAXILAB072 database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-08-16_09-05-34PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at sun.security.action.LoadLibraryAction.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
    at sun.awt.DebugHelper.<clinit>(Unknown Source)
    at java.awt.Component.<clinit>(Unknown Source)
    I see in this forum some solutions but none works for me (I´m installing Oracle Unbreakable Linux 5 x64) to solve this problem I put libXp lib but the problem is the same.
    The library is installed:
    [root@SRVAXILAB072 oracle]# ll /usr/lib64/libXp.so.6
    lrwxrwxrwx 1 root root 14 Aug 16 18:10 /usr/lib64/libXp.so.6 -> libXp.so.6.2.0
    [root@SRVAXILAB072 oracle]#
    But I think the installation process are searching in /usr/lib but I didn´t have the library in 32b I tried to copy to /usr/lib and another crazy ideas but didn’t work.
    I read alot of post and guides for installation process but I didn´t see nothing to install Oracle in Oracle Unbreakable Linux 5
    Some ideas??
    If not..... I will try with Oracle Unbreakable linux 4 :(
    Thanks
    Best Regards

    Well, I've not been in touch with installs on linux myself for a long time, but it seems you need a few 32-bit libs. Try installing libXp-1.0.0-8.i386.rpm.

  • INFORMIX and ORACLE on LINUX

    Hello Stephen,
    some time ago we talked about Forte for LINUX. Now I think it will need
    not a long time that Forte is available on LINUX.
    INFORMIX and ORACLE has officially announced that they offer their
    Database on LINUX. Now it is only a question of time, that Forte
    got a business-case from big Firms which want to see Forte on LINUX.
    In GERMANY I know that Mercedes use LINUX for car-development and
    Sixt-Budget use LINUX for their car-rental (worldwide).
    I think, if Forte is availaible for LINUX than a big beng goes through
    the IT-Market. Many firms just wait for a OO-orientated 4GL-Development
    environment to distribute their business-processes to many little
    servers which are cheap and powerfull. It is than a question of
    less money to use a big machine or just 10 or 20 LINUX servers (which are
    cheaper and faster).
    Sorry for my enthusiasm on this mailing list, but i'am
    so happy to hear from this and want's to cry it out all over the world :-)))))
    Joseph Mirwald

    At 09:03 AM 8/22/98 +0200, Joseph Mirwald wrote:
    Hello Stephen,
    some time ago we talked about Forte for LINUX. Now I think it will need
    not a long time that Forte is available on LINUX.Well, I suspect if you ask them, the official policy statement is: Linux is
    not a supported platform at this time, and we cannot discuss unannounced
    products. (or some such thing). Privately, talking to some of the Forte
    people at FORUM this year, I was distinctly left with the impression that
    it will be a cold day in hell before such a port is done.
    INFORMIX and ORACLE has officially announced that they offer their
    Database on LINUX. Now it is only a question of time, that Forte
    got a business-case from big Firms which want to see Forte on LINUX.Well, I haven't talked to our Oracle sales rep, but I did go to their web
    site and I couldn't find anywhere where you could download it, or much more
    than a "how great it is" statement. Based upon my prior dealings with
    Oracle, and some well documented cases, I would be surprised if you could
    get it today - delivered and working, that is.
    Informix, on the other hand, I just downloaded (not installed yet, but at
    least I have in my hot little paws something that says it will be Informix
    on Linux).
    One of the problems that Forte faces in the marketplace is the cost of the
    product. Yes, it does a lot (personally, I'm quite a fan). But, some IT
    shops - especially the ones that have capable people on staff - are
    beginning to look at the distributed object characteristics of Java and
    asking "Why can't I do what I want with Java RMI, etc.?" When I talked to a
    Forte salesman at FORUM, his only response was "Well, those really aren't
    Forte customers anyway!" As Java adds things like transactional objects,
    transparent database access (yup! persistent objects in a relational
    database - without all the coding - and with performance too!), JavaSpaces,
    Jini, etc. I think it's a "head in the sand" approach for Forte to ignore
    this. To me, Java presents some very compelling features. And, according to
    some friends I have inside of Sun, basically all of the brightest people in
    Sun have all migrated over to doing the Java stuff, so it's only likely to
    get better. People like Rick Cattel (databases) and Jim Waldo (distributed
    object systems) who have been giving this stuff lots of thought for
    years!! That's why it's so well thought out when you see it for the first
    time.
    The only glaring omission from it seems to be a generic event queue
    mechanism. Fortunately, given the other stuff Java has to offer (RMI, event
    classes, etc.) you can build a very good one in about a man week. In fact,
    Java has one, they just didn't take a "high" enough superclass - they
    limited it to AWT events. If they had made it all events, you wouldn't even
    have to build that.
    Now, don't get me wrong... Forte is planning to incorporate lots of really
    cool Java stuff in their next release (preannounced at FORUM). But to me,
    that's not the issue on a larger scale. The real issue is this: are
    environments which are cheaper incorporating a lot of what Forte does - and
    the answer is Yes! Incidentally, there is a version of the Java environment
    being developed for Linux under the GNU license, for the express purpose of
    making it open and keeping it free (and open). Someone recently told me
    that it is now available, but I haven't confirmed that yet.
    In GERMANY I know that Mercedes use LINUX for car-development and
    Sixt-Budget use LINUX for their car-rental (worldwide).My perception is that the Europeans are more progressive and cooperative
    than us in the states. Most of the really good Linux help I've gotten on
    the net has been form Europe (including a wonderful sendmail
    site/expert). :-)
    I think, if Forte is availaible for LINUX than a big beng goes through
    the IT-Market. Many firms just wait for a OO-orientated 4GL-Development
    environment to distribute their business-processes to many little
    servers which are cheap and powerfull. It is than a question of
    less money to use a big machine or just 10 or 20 LINUX servers (which are
    cheaper and faster).Well, as I was indicating above, people who are cost conscious might be
    searching for lower cost alternatives to Forte itself.
    Sorry for my enthusiasm on this mailing list, but i'am
    so happy to hear from this and want's to cry it out all over the world:-)))))
    <soapbox>
    So, who says that all reactions have to be between 4 & 6 (5 being
    neutral)!! Don't apologize. If you're excited - be excited! That's what
    life is all about.
    </soapbox>
    Stephen

  • Reports from Java and Oracle database

    Hi
    I need to generate couple of reports from my application, with Java as front end and oracle 11.2.0.3.0.  database . Reports are  having very simple select statements, using the criteria users enter from GUI. we don't need to execute a  direct select statement from Java, with the where clauses . I did some research and found out about Pipelined functions. I tested for a small set of records and it worked fine. Will this work for large data set? any drawbacks of using this method?  Any other methods for this requirement?
    Thanks in advance
    JP

    Pipeline table functions do not sound like the appropriate approach. It is designed to primarily deal with data transformations. Using it as a rendering engine for report writing? There are fundamental problems with such an approach.
    As Dave and Andre commented - the CORRECT means for PL/SQL to pass "data" to Java (or other client languages) is via reference cursors (pointers that the client can use for referencing SQL cursor programs on the server). And Java as a report writer does not really compare with the ease and flexibility that Oracle Apex (Application Express) provides as a reporting framework.

  • Diff between oracle linux and oracle enterprise linux?

    hi all,
    i am new to this flavor of Linux. I know oracle linux has red hat source, but i am confused about the difference betweek oracle linux which comes in versions 4 (upto update 8) and 5 (latest update being 5).
    i need to install oracle enterprise linux at a client place, so i gota know the difference.
    Should i be installing oracle Linux first and then run the rpm of "Unbreakable Enterprise Kernel"? or is the "Unbreakable Enterprise Kernel" only for customers who require this kernal on oracle linux update 5 x86_64?
    thanks

    waldorfm wrote:
    From what I understand Oracle Enterprise Linux (OEL) is a rebranded version of Red hat Enterprise Linux (RHEL).
    Oracle Linux (OL) is OEL plus Oracle optimization and custom, newer kernel. OL with Oracle "Unbreakable Enterprise Kernel" is available as x86_64 only and was introduced based on OEL or RHEL 5.5.
    You can install OEL 5.4 and easily upgrade to OEL 5.5, PMFJI, but can you point me to docs on how to make that upgrade? The timing of this msg on the forum was exquisite, as I started looking at that just today. I have an OEL 5.4 installation and would much rather upgrade to 5.5 than to have to rebuild from scratch.
    I did a yum install kernel with the 5.5 version of the public-yum-el5.repo. That went without a hitch and now reports "2.6.32-100.0.19.el5 #1" where I was 2.6.18-164.el5, but I also see
    [root@myserver ~]# uname -a
    Linux myserver 2.6.32-100.0.19.el5 #1 SMP Fri Sep 17 17:51:41 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
    [root@myserver ~]# cat /etc/enterprise-release
    Enterprise Linux Enterprise Linux Server release 5.4 (Carthage)
    [root@myserver ~]# cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 5.4 (Tikanga)Bottom line is that I am charged with updating the kernel to a 2.6 version newer than 19 Sep, or applying a patch for the compat_alloc_user_space() function, and am not sure exactly how to proceed from here.
    if you like or start to install from version 5.5, and then install OL 5.5 by downloading the Oracle public yum repository and follow the instructions at http://public-yum.oracle.com

  • 3 tiers model with Java and Oracle.

    Hi everybody. I have a problem with my work. I want to design a simple program follow 3 tiers model with Java and database is Oracle. But I do not know how I can design them. Please help me. It will better if you give some source code for each layer.
    Thanks in advance.
    Ky Thanh.

    I'd suggest searching the net for tutorials. Pick out the things you don't know about and need to know (SQL? JDBC? Java? software design in general?) and google: tier architecture, sql tutorial, etc. Sun's Java & JDBC tutorials are at http://java.sun.com/learning/tutorial/index.html
    Source for each tier? Read the JDBC tutorial and you can write the database tier source yourself. Learn Swing/Servlets/whatever you use for the user interface and you can write the top tier. The middle tier is your business logic, which is dependent on your area of business, and you'll need to know about the business and just general programming. Then if the tiers need to be distributed (hopefully not), you'll need to learn EJB or something.
    I hope you haven't been given a task there you aren't ready to take on... Learning to swim by jumping into the river is a great way to learn in a school assignment, but you mention work, and learning that way at work sounds a bit risky to me.

  • What files to download for java and oracle?

    Hey
    I have read that i have to download and implement some drivers to get oracle to work in
    java, but which should i download and where?
    Im using Oracle Express 10 and java 1.6
    Thanks

    Here's the link to get just the drivers
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    You could also install the oracle client if you wish to use sql*plus, it has jdbc drivers in folder named jdbc. This is probably a good idea as sql*plus can prove whether your problem is java or oracle.
    Installation is simple, you put ojdbc14.jar in the classpath of your compiles and executions. If you are using an IDE, you follow what it provides in its documentation. For Java Studio Enterprise you add them from the "Runtime" window.

  • Java and Oracle Reports

    How to connect java with oracle report server... i m using a swing application.... I have seen api documentation but didnt get things. please help...

    user13323568 wrote:
    How to connect java with oracle report server... i m using a swing application.... I have seen api documentation but didnt get things. please help...How can anyone help you?
    You "don't get things", that is a problem you have to solve before you can be helped. Maybe you just need to spend more time on it or find better documentation; API documentation is only a reference, not a manual.

  • Connection of java and oracle 10g express edition

    hello!!!!!
    I'm new to databases as well as JDBC. I want to know how to connect to oracle 10g express edition with java to create a desktop application.
    Let me know step by step procedure if possible.....
    Also tell me which softwares or drivers other than oracle 10g and jdk1.6 will be required......
    Do i need to keep all the required softwares and drivers in the same folder???
    please give any other information which is required for the connection
    thank you!!!

    hello!!!!!
    I'm new to databases as well as JDBC. I want to know how to connect to oracle 10g express edition with java to create a desktop application.
    Let me know step by step procedure if possible.....
    Also tell me which softwares or drivers other than oracle 10g and jdk1.6 will be required......
    Do i need to keep all the required softwares and drivers in the same folder???
    please give any other information which is required for the connection
    thank you!!!

  • Communication between Java and Oracle

    Hello,
    I have replicated databases running 9iR2.
    Once insert/update/delete transaction is commited
    by replication(master site, backend server),
    notification needs to be sent to front end server
    (eg rowid and tran type update/delete/insert)
    Upon insert/delete/update java stored procedure needs
    to open a socket to frontend server and pass the
    message (rowid and tran type update/delete/insert)
    How can this be accomplished?
    I believe this can be accomplished using Java stored
    procedure. Can someone explain how?
    Thanks.
    Oracop

    If you go up to Search, and enter "JMS", you'll get loads of documentation. http://tahiti.oracle.com will also have plenty of documentation. http://java.sun.com will also have lots of documentation and sample code.
    Justin

  • Java and oracle connection

    Hello
    I have made tables in oracle and im tryin g 2 connect these tables to java where i have made forms. i havent downloaded any driver but i think when i installed Oracle 8.1.7 it has jdbc drivers too. now i dont know which driver it is, thin, internal, etc. im tryin to run a separate code which checks the connection. It keeps giving an error saying that the" specified driver does not exist". but i dont know wot to do coz i dont know which driver it is.
    here is the code , hope somebody can help me
    import java.sql.*;
    import java.util.*;
    public class MyConnection
         Connection con;
         MyConnection()
              try
    // ******************************Connected To Jdbc-Odbc Type - 1 Driver
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    //               con = DriverManager.getConnection("Jdbc:Odbc:dsnname","userid","password");
                   con = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=servername;Database=pubs","userid","password");
    // ******************************Connected To Ms-Access JDBC ODBC Driver .
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("Jdbc:Odbc:dsnname","","");
    //               con = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=G:/admin.mdb","","");
    // ******************************Connected To Ms-Access Type-3 Driver.
         /*          Class.forName ("acs.jdbc.Driver");
                   String url = "jdbc:atinav:servername:5000:C:\\admin.mdb";
                   String username="Admin";
                   String password="";
                   Connection con = DriverManager.getConnection(url,username,password);
    // ******************************Connected To Microsoft SQL.
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection("jdbc:microsoft:sqlserver://servername:1433","userid","password");
    // ******************************Connected To Merant.
                   Class.forName("com.merant.datadirect.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection("jdbc:merant:sqlserver://servername:1433;User=userid;Password=password");
    // ******************************Connected To Atinav SqlServer.
                   Class.forName ("net.avenir.jdbc2.Driver");
                   con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
    // ******************************Connected To J-Turbo.
    /*               String server="servername";
                   String database="pubs";
                   String user="userid";
                   String password="password";
                   Class.forName("com.ashna.jturbo.driver.Driver");
                   con= DriverManager.getConnection("jdbc:JTurbo://"+server+"/"+database,user,password);
    /*// ******************************Connected To jk Jdbc Driver.
                   String url= "jdbc:jk:server@pubs:1433";
                   Properties prop = new Properties();
                   prop.put("user","userid");//Set the user name
                   prop.put("password","password");//Set the password
                   Class.forName ("com.jk.jdbc.Driver").newInstance();
                   con = DriverManager.getConnection (url, prop);*/
    // ******************************Connected To jNetDirect Type - 4 Driver
    /*               String sConnect = "jdbc:JSQLConnect://127.0.0.1/database=pubs&user=userid&password=password";
                   Class.forName ("com.jnetdirect.jsql.JSQLDriver").newInstance();     
                   Connection con= DriverManager.getConnection(sConnect);
    // ******************************Connected To AvenirDriver Type - 4 Driver
    //               String url= "jdbc: AvenirDriver: //servername:1433/pubs";
    //               java.util.Properties prop = new java.util.Properties ();
    //               prop.put("user","userid");
    //               prop.put("password","password");
    /*               Class.forName ("net.avenir.jdbc2.Driver");     
                   System.out.println(" Connected To AvenirDriver Type - 4 Driver");
                   con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
    // ******************************Connected To iNet Sprinta2000 Type - 4 Driver
         /*          String url="jdbc:inetdae7:servername:1433";
                   String login="userid";
                   String password="password";
                   Class.forName("com.inet.tds.TdsDriver");
                   System.out.println(" Connected To iNet Sprinta2000 Type - 4 Driver");
                   con=DriverManager.getConnection(url,login,password);
    // ******************************Connected To iNet Opta2000 Type - 4 Driver
    /*               String url="jdbc:inetdae7:servername:1433";
                   String login="sagar";
                   String password="sagar";
                   Class.forName("com.inet.tds.TdsDriver").newInstance();
                   System.out.println(" Connected To iNet Opta2000 Type - 4 Driver");
                   con=DriverManager.getConnection(url,login,password);
                   DatabaseMetaData md = con.getMetaData();
                   System.out.println("Driver Name            " + md.getDriverName());
                   System.out.println("Driver Version         " + md.getDriverVersion());
                   System.out.println("Database URL is        " + md.getURL());
                   System.out.println("Database UserName is   " + md.getUserName());
                   System.out.println("Connection Name        " + md.getConnection());
                   System.out.println("Database Name          " + md.getDatabaseProductName());
                   System.out.println("Database Version       " + md.getDatabaseProductVersion());
                   System.out.println("Database ReadOnly Type " + md.isReadOnly());
                   System.out.println("MaxColumnNameLength    " + md.getMaxColumnNameLength());
                   System.out.println("MaxConnections         " + md.getMaxConnections());
                   System.out.println("");
              catch(ClassNotFoundException cnfe)
                   System.out.println(cnfe.getException());
                   System.out.println("The Specified Driver Does not Exist....");
              catch(SQLException sqle)
                   if(sqle.getErrorCode() == 0)
                        System.out.println("No Suitable Driver Found..");
                   else if(sqle.getErrorCode() == 1017)
                        System.out.println("Wrong UserName Or Password..");
                   else if(sqle.getErrorCode() == 1034)
                        System.out.println("Database not Started..");
                        System.out.println(sqle.getErrorCode());
                        System.out.println(sqle.getSQLState());
                        System.out.println(sqle);
         public static void main (String args[])
              new MyConnection();
    }

    hi
    i did this as u told,
    import java.sql.*;
    import java.util.*;
    public class MyConnection
         Connection con;
         MyConnection()
              try
                      Class.forName("oracle.jdbc.driver.OracleDriver");
                      con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:Orahome","scott","tiger");
    // ******************************Connected To Jdbc-Odbc Type - 1 Driver
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    //               con = DriverManager.getConnection("Jdbc:Odbc:dsnname","userid","password");
                   con = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=servername;Database=pubs","userid","password");
    // ******************************Connected To Ms-Access JDBC ODBC Driver .
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("Jdbc:Odbc:dsnname","","");
    //               con = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=G:/admin.mdb","","");
    // ******************************Connected To Ms-Access Type-3 Driver.
         /*          Class.forName ("acs.jdbc.Driver");
                   String url = "jdbc:atinav:servername:5000:C:\\admin.mdb";
                   String username="Admin";
                   String password="";
                   Connection con = DriverManager.getConnection(url,username,password);
    // ******************************Connected To Microsoft SQL.
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection("jdbc:microsoft:sqlserver://servername:1433","userid","password");
    // ******************************Connected To Merant.
                   Class.forName("com.merant.datadirect.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection("jdbc:merant:sqlserver://servername:1433;User=userid;Password=password");
    // ******************************Connected To Atinav SqlServer.
                   Class.forName ("net.avenir.jdbc2.Driver");
                   con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
    // ******************************Connected To J-Turbo.
    /*               String server="servername";
                   String database="pubs";
                   String user="userid";
                   String password="password";
                   Class.forName("com.ashna.jturbo.driver.Driver");
                   con= DriverManager.getConnection("jdbc:JTurbo://"+server+"/"+database,user,password);
    /*// ******************************Connected To jk Jdbc Driver.
                   String url= "jdbc:jk:server@pubs:1433";
                   Properties prop = new Properties();
                   prop.put("user","userid");//Set the user name
                   prop.put("password","password");//Set the password
                   Class.forName ("com.jk.jdbc.Driver").newInstance();
                   con = DriverManager.getConnection (url, prop);*/
    // ******************************Connected To jNetDirect Type - 4 Driver
    /*               String sConnect = "jdbc:JSQLConnect://127.0.0.1/database=pubs&user=userid&password=password";
                   Class.forName ("com.jnetdirect.jsql.JSQLDriver").newInstance();
                   Connection con= DriverManager.getConnection(sConnect);
    // ******************************Connected To AvenirDriver Type - 4 Driver
    //               String url= "jdbc: AvenirDriver: //servername:1433/pubs";
    //               java.util.Properties prop = new java.util.Properties ();
    //               prop.put("user","userid");
    //               prop.put("password","password");
    /*               Class.forName ("net.avenir.jdbc2.Driver");
                   System.out.println(" Connected To AvenirDriver Type - 4 Driver");
                   con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
    // ******************************Connected To iNet Sprinta2000 Type - 4 Driver
         /*          String url="jdbc:inetdae7:servername:1433";
                   String login="userid";
                   String password="password";
                   Class.forName("com.inet.tds.TdsDriver");
                   System.out.println(" Connected To iNet Sprinta2000 Type - 4 Driver");
                   con=DriverManager.getConnection(url,login,password);
    // ******************************Connected To iNet Opta2000 Type - 4 Driver
    /*               String url="jdbc:inetdae7:servername:1433";
                   String login="sagar";
                   String password="sagar";
                   Class.forName("com.inet.tds.TdsDriver").newInstance();
                   System.out.println(" Connected To iNet Opta2000 Type - 4 Driver");
                   con=DriverManager.getConnection(url,login,password);
                   DatabaseMetaData md = con.getMetaData();
                   System.out.println("Driver Name            " + md.getDriverName());
                   System.out.println("Driver Version         " + md.getDriverVersion());
                   System.out.println("Database URL is        " + md.getURL());
                   System.out.println("Database UserName is   " + md.getUserName());
                   System.out.println("Connection Name        " + md.getConnection());
                   System.out.println("Database Name          " + md.getDatabaseProductName());
                   System.out.println("Database Version       " + md.getDatabaseProductVersion());
                   System.out.println("Database ReadOnly Type " + md.isReadOnly());
                   System.out.println("MaxColumnNameLength    " + md.getMaxColumnNameLength());
                   System.out.println("MaxConnections         " + md.getMaxConnections());
                   System.out.println("");
              catch(ClassNotFoundException cnfe)
                   System.out.println(cnfe.getException());
                   System.out.println("The Specified Driver Does not Exist....");
              catch(SQLException sqle)
                   if(sqle.getErrorCode() == 0)
                        System.out.println("No Suitable Driver Found..");
                   else if(sqle.getErrorCode() == 1017)
                        System.out.println("Wrong UserName Or Password..");
                   else if(sqle.getErrorCode() == 1034)
                        System.out.println("Database not Started..");
                        System.out.println(sqle.getErrorCode());
                        System.out.println(sqle.getSQLState());
                        System.out.println(sqle);
         public static void main (String args[])
              new MyConnection();
    }i tried it but i still get the same error msg. tht the specified driver does not exist.
    i have in my classpath - CLASSPATH=.;[ORACLE_HOME]jdbc\lib\classes12.zip
    and in my variable ORACLE_HOME AND it s value - C:\oracle\ora81
    the error that i get is
    C:\Program Files\JBuilder\jdk1.4\bin\javaw -classpath "C:\Documents and Settings\Administrator\jbproject\classes;C:\Program Files\JBuilder\jdk1.4\demo\jfc\Java2D\Java2Demo.jar;C:\Program Files\JBuilder\jdk1.4\demo\plugin\jfc\Java2D\Java2Demo.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\charsets.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\ext\dnsns.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\ext\ldapsec.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\ext\localedata.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\ext\sunjce_provider.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\im\indicim.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\jaws.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\jce.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\jsse.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\rt.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\sunrsasign.jar;C:\Program Files\JBuilder\jdk1.4\lib\dt.jar;C:\Program Files\JBuilder\jdk1.4\lib\htmlconverter.jar;C:\Program Files\JBuilder\jdk1.4\lib\tools.jar" MyConnection
    null
    The Specified Driver Does not Exist....

  • Java and Oracle support for Solaris 10?

    Hi
    Does anybody know when Oracle plans to support Solaris 10?
    We plan to purchase a Opteron server and would like to use Oracle.
    We also plan to use Sun Java AppServer Platform Edition. Any idea when that will support Solaris 10?
    Am I correct in assuming that Solaris x86 will run fine on an Opteron system.
    thanks in advance

    Oracle support Solaris 10 x86 but I doubt it's native 64 bits. The App. server is supported just go to Sun's site. The short answer is that Oracle and the App. server should both work but not necessarily in 64 bit mode.
    As for the Opteron system, you should check the HCL.

Maybe you are looking for

  • Converting sales order into a XML file

    Hai....friends.... I am tring to send an sales order as iDOC to a xml port in the same application server.... 1. have created a xml port with path..\usr\sap\RRM\SYS\global\. 2. assigned it to logical system. 3.Have a RFC destination of TCP/ip(LOCAL_E

  • Not all loops appear in loop browser... even after I reindex.  Please help.

    I've just spent the past couple of hours trying to reindex my loops so that they all show in the browser... to no avail. Which is to say, they will show, if you know how to find them. Let me explain: I have Jam Pack Promos 2, 3, and 4. These loops be

  • IPhone 4S (iOS 6.1.3) connects to home Wifi, but not O2 or the_Cloud hotspots

    Hello. I have been having some issues connecting to hotspot wifi. I can connect to my home and office wifi without a problem, but my phone will not automatically connect to wifi hotspots. When I try to connect manually, the phone hangs on the login s

  • New HD and new motherboard on Mac Mini and OSX will not start.

    Long story but will do my best to keep it short... Purchased Mac mini #1 at CompUSA years back and bought their extended warranty. Mini died 2+ years later which coincided with CUSA going out of business. Problem was a flashing folder with the Mac lo

  • Text-to-sp​eech in CVI ?

    Hi, I'm just working on a CVI project and I wish to implement some text-to-speech function. My purpose is to inform the operator that some problem occurs in the process, both with a standard message popup and a "vocal" one. I can't use waves as I wan