How to register jdbc driver in java application

Using Java Studio Enterprise:
1. Add mssqlserver.jar to Libraries.
2. jar contains package: com.microsoft.jdbc.sqlserver,
package contains SQLServerDriver.class
Trying to register this driver in program with:
Class.forName("com.microsoft.jdbc.SQLServerDriver");
raises exception ClassNotFoundException
Maybe I should put mssqlserver.jar to specific folder?
For web application using same driver works fine.

hi,
Class.forName("com.microsoft.jdbc.SQLServerDriver");
raises exception ClassNotFoundExceptionFirst you check weather these jar files is in your lib <folder>
msbase.jar,mssqlserver.jar,msutil.jar
if no, copy that files and try it,

Similar Messages

  • How to register jdbc Driver in Applet

    Dear Sir,
    i am running a applet through jsp
    i am using following softwares
    jakarta-tomcat-4.1.10
    mysql 3.23.52-max
    jsp
    j2sdk1.3.1
    Linux 7.3
    Netscape 4.*
    the problem is when i am trying to load the applet in jsp
    <jsp:plugin type="applet" code="XX" width="XX" height="XX">
    </jsp:plugin>
    it gives following message
    the page contains information of type
    (application/x-java-applet;jpi-version=1.4) that can we viewer with
    appropriate Plug-in , so i am using applet tag
    but it is running fine in browser if i give .html extension
    the other problem is , my normal jsp are running and getting connected to Mysql
    but when i use applet it is giving error ClassNot Found Error, i have included jar
    file mysql-connector-java-3.0.1-beta in my class path
    do i have to install the jar file on the client m/c as applet runs on client m/c
    how to register driver in Applet
    thank you
    sunil

    I'm not sure about the jsp page thing but to get your mysql working in the applete what you need to do is in the <Applete> tag where you have archive=myclass.jar add this to it archive="myclass.jar, mysql-connector-java-3.0.1-beta.jar"
    make sure the mysql...jar is in the same dir as your jar file and the database server is on the same machine. It won't let you connect from an applete to a database that's on a diffrent machine. You'll get an access denied error.
    For the jsp page try putting your class as the code="my.class" and add archive="same stuff to fix <Applete>"
    that might work.
    Hope I gave you enough info to get you on the right track.
    Matt S.

  • Oracle 9.2.0.1.0 JDBC driver for Java 1.5 & Java 1.6

    Hi,
    Is there any JDBC driver that I can download for running Java application of version 1.5 or 1.6 on Oracle 9.2.0.1.0 ?
    As I see in the official link of Oracle: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    The JDBC drivers for this database are only for Java 1.4 and older.
    Can any one please help?
    Thanks
    Edited by: user11088169 on 05:21 09/06/2009

    The subject is about Oracle 9.2.0.1 JDBC drivers. "Oracle 9.2.0.1.0 JDBC driver for Java 1.5 & Java 1.6"
    Oracle database 9.2.0 drivers may only be used with JDK 1.4 or earlier.
    But, Oracle database 9.2.0 may be used with Oracle database 11 drivers with JDK 5.0, 6.0.

  • How to register a webserive in NetWeaver Application Server?

    Dear All,
    Can you please explain how to register a werbservice in Netweaver Application server?
    Gafar

    Mahesh,
    Thank you for your reply.
    I have gone through the sap note 63930. I need some more details to fix my problem.
    My application flow is as follows.
    1. There is a webservice in SAP XI.
    2.The webservice is calling from a Java Web application by  
        using Java JNDI lookup.
    While calling the XI through jndi lookup,
    I am getting an exception, NameNotFoundException. This is because of the non existing/Name mismatch of JNDI lookup on Web AS.
    My question is How and Where can we check the JNDI registry? I am not familiar with Visual Administrator. Can you please help me regarding this problem.
    Abdul Gafar

  • How to run ear file in java application server

    i want how to run .ear file in java application server
    1. i m created ear file
    2. i m created jar file (bean,home,remote)
    3.i m created war file(in the form of jsp)
    but till now i couldnt run ear file
    how to run
    please hel me

    You must create :
    1.Jar file
    2.War file
    And then put them into an ear file
    Exemple : myapp.ear contains
    myappEJB.jar
    myappWEB.war
    META-INF/application.xml
    and application.xml looks like this :
    <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee
                            http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
        <display-name>myapp</display-name>
        <description>Demo application</description>
        <module>
            <ejb>myappEJB.jar</ejb>
        </module>
        <module>
          <web>
             <web-uri>myappWAR.war</web-uri>
             <context-root>/myapp</context-root>
          </web>
        </module>
    </application>Good luck

  • How many web.xml in a java application

    Hi,
    can anyone give tell the answer for this question "How many web.xml in a java application?"

    1Why ?Because the Web container refers to only one web.xml for one web application.
    I havent heard of an application having more than 1 web.xml
    How?It reads all the definitions of servlet mappings, filters, welcome-file etc from this file itself.
    Where?From the following folder ...
    /WEB-INF
    By the way ..... the way you questioned me was amuzing ... Why? How ?Where ? Its funny :D
    I actually wanted to reply as below ..
    Why ?Why not
    How?
    Wait lemme think ....ummm... What do you mean how??
    Where ?
    Inside the web ;-)
    -Rohit

  • How do i  open browser in java application

    hi....
    please help me!!!!!!!!!!!!!!!!!!!!!!!!!!
    how do i open browser in java application ? ( for show javascript in java application)
    thank you.......

    You can run any program from java by doing
    Runtime.getRuntime().exec("mybrowser myjavascriptfile.js");
    The real question is why would you want to.
    I would suggest you rethink whether running Javascript from Java is a good idea.

  • How to registe a schema to an application

    hi, how to registe a schema to an application . (11i)

    Please use the search feature since this topic was discussed before in the forum.
    Here is the link you can start with:
    http://forums.oracle.com/forums/search.jspa?threadID=&q=216589.1+&objID=c3

  • How to transfer parameters to Webdynpro Java application ?

    Hello guys,
    I had developed a Webdynpro Java application "ZWD", it's URL is
    "http://jt-pldev:50000/webdynpro/dispatcher/local/ZWD_FLIGHT/ZWD".
    "ZWD" had 2 input parametere "InputField" and "InputField1" .
    Accroding to SAP Online Help  document, we can transfer parameter Webdynpro application .
    I want to transfer parameters to application "ZWD"  via URL
    "http://jt-pldev:50000/webdynpro/dispatcher/local/ZWD_FLIGHT/ZWD?InputField=Frankfurt" .
    But it failed.
    My questions:
    1. How to transfer parameter to Webdynpro Java application "ZWD" ?
    2. Does it possible that transfer input parameter to Webdynpro application and run the applicaiton via specific URL ?
    BR,
    Louis

    Hi Louis,
    You can refer to the following Bertram's article:
    [Inter-Application-Navigation in Web Dynpro|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/library/user-interface-technology/wd%20java/wdjava%20archive/inter-application-navigation%20in%20web%20dynpro.pdf]
    The process of accessing the Application URL parameters is explained for Target Component.
    Regards,
    Alka.

  • How do i show javascript in java application?

    hi.......
    how do i show javascript in java application? ( run javascript in java application )
    thank you...
    ( i love java developer)

    From java you can run any program. You can run javascript in a browser.
    So you need to open a browser in java to run the javascript.
    This is unlikely to have the desired effect however. Why do you want to this?

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

  • How do i show vbscript into java application?

    hi
    how do i show vbscript into java application? ( looks like microsoft frontpage)
    or what is interpreter of vbscript for java ?
    thank you?

    There probibly isn't one.
    vbscript and java are rather different. You are better of opening a vbscript viewer from java as a sperate program.

  • How do i show javascript into  java application?

    hi
    ( please help me!!!!!!!!!!!!!!!!!)
    how do i run javascript into java application ?( looks like microsoft frontpage )
    thank you ?

    There is a JavaScript interpreter called Rhino implemented in Java, maybe you can use it: http://www.mozilla.org/rhino/

  • How to add images into a java application (not applet)

    Hello,
    I am new in java programming. I would like to know how to add images into a java application (not an applet). If i could get an standard example about how to add a image to a java application, I would apreciated it. Any help will be greatly apreciated.
    Thank you,
    Oscar

    Your' better off looking in the java 2d forum.
    package images;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.FileInputStream;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    /** * LogoImage is a class that is used to load images into the program */
    public class LogoImage extends JPanel {
         private BufferedImage image;
         private int factor = 1; /** Creates a new instance of ImagePanel */
         public LogoImage() {
              this(new Dimension(600, 50));
         public LogoImage(Dimension sz) {
              //setBackground(Color.green);      
              setPreferredSize(sz);
         public void setImage(BufferedImage im) {
              image = im;
              if (im != null) {
                   setPreferredSize(
                        new Dimension(image.getWidth(), image.getHeight()));
              } else {
                   setPreferredSize(new Dimension(200, 200));
         public void setImageSizeFactor(int factor) {
              this.factor = factor;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              //paint background 
              Graphics2D g2D = (Graphics2D) g;
              //Draw image at its natural size first. 
              if (image != null) {
                   g2D.drawImage(image, null, 0, 0);
         public static LogoImage createImage(String filename) { /* Stream the logo gif file into an image object */
              LogoImage logoImage = new LogoImage();
              BufferedImage image;
              try {
                   FileInputStream fileInput =
                        new FileInputStream("images/" + filename);
                   image = ImageIO.read(fileInput);
                   logoImage =
                        new LogoImage(
                             new Dimension(image.getWidth(), image.getHeight()));
                   fileInput.close();
                   logoImage.setImage(image);
              } catch (Exception e) {
                   System.err.println(e);
              return logoImage;
         public static void main(String[] args) {
              JFrame jf = new JFrame("testImage");
              Container cp = jf.getContentPane();
              cp.add(LogoImage.createImage("logo.gif"), BorderLayout.CENTER);
              jf.setVisible(true);
              jf.pack();
    }Now you can use this class anywhere in your pgram to add a JPanel

  • Distribute JDBC driver with our application

    we are not an oracle customer, but we develop an application that has a component that leverages the JDBC driver to connect to the Oracle database. is it ok to distribute the JDBC driver with this application component? i don't see anything in the licensing policy that prevents us from doing so. do we need to be a member of the oracle partner network at a certain level?
    thx.

    we are not an oracle customer, but we develop an application that has a component that leverages the JDBC driver to connect to the Oracle database. is it ok to distribute the JDBC driver with this application component? i don't see anything in the licensing policy that prevents us from doing so. do we need to be a member of the oracle partner network at a certain level?
    You were REQUIRED to accept the license agreement prior to downloading the JDBC driver software. It is expected that you will actually READ the license agreement prior to accepting it.
    Oracle Database 12c Release 1 JDBC Driver Downloads
    You must accept the OTN License Agreement to download this software.
    That license agreement CLEARLY answers your question so you should re-read it. You are bound by ALL of the terms but this is copied directly from that link:
    License Rights
    We grant you a nonexclusive, nontransferable limited license to use the programs: (a) for purposes of developing, testing, prototyping and running applications you have developed for your own internal data processing operations; (b) to distribute the programs with applications you have developed to your customers provided that each such licensee agrees to license terms consistent with the terms of this Agreement, you do not charge your end users any additional fees for the use of the programs, and your end users may only use the programs to run your applications for their own business operations; and (c) to use the programs to provide third party demonstrations and training. You are not permitted to use the programs for any purpose other than as permitted under this Agreement. If you want to use the programs for any purpose other than as expressly permitted under this agreement you must contact us, or an Oracle reseller, to obtain the appropriate license. We may audit your use and distribution of the programs. Program documentation is either shipped with the programs, or documentation may accessed online at http://www.oracle.com/technetwork/indexes/documentation/index.html.
    Item (b) above begins with 'to distribute the programs . . .'
    Yes - you can distribute the JDBC driver as long as you abide by that license agreement in its entirety (not just the quote I provided).
    Any and all questions need to be directed to Oracle as noted in the License Agreement. No one on the forums can speak for Oracle.

Maybe you are looking for