How make installer java with mySQL database

How do I create a java installer for windows, because I have a project that uses mySQL database.
Anyone please help me....

If you have eg. a desktop application which needs a database, but don't have/ need a database server, which is accessed by several instances of the application (which seems to be the case, otherwise you wouldn't want to install it along with the application), consider an embedded database such as Apache Derby/ Java DB.
Then all you need is to ship some jars and make sure they are on the classpath.
If you're using JPA and generate the DB schema, then switching DB vendors should be quite easy. Just reconfigure your persistence.xml.

Similar Messages

  • How to connect JSP with MySql Database?

    HI All...
    I want to know or How to connect Mysql with JSP or JSF any other software is available? please help me.....

    I want to know or How to connect Mysql
    with JSP or JSF any other software isavailable?
    please help me.....First you need to find 25 m of a CatV cable and...The DB files need to be located on the ninth device of a SCSI Daisy Chain with the total SCSI cable length being over 150 m (and the devices (and cables) need to be mix of Differential and Non-Differential).
    Edit: And forget the terminator, who needs it?

  • How to connect java with oracle

    can any body show me the code of how to connect java with oracle database.
    thank you

    To configure Oracle JDBC:
    1. Add Oracle JDBC JAR file classes12.zip or ojdbc14.zip to classpath.
    2. Load and register the JDBC driver.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    3. Obtain a connection:
    String url="jdbc:oracle:thin:@<host>:1521:<database>
    Connection con = DriverManager.getConnection(url,
    "myLogin", "myPassword");
    4. Create a SQL statement.
    Statement stmt = con.createStatement();
    5. Obtain a result set.
    ResultSet rs = stmt.executeQuery(
    "SELECT ...");

  • How to use Ago function in BIEE with mysql database

    Hi experts,
    Ago function works well in Oracle database,but when I tried a mysql database,it didn't show results as expected. Anyone knows how to use Ago with mysql as data source?

    Hi Gurus, need help

  • How i can Create Master Repository with MySQL Database?

    How i can Create Master Repository with MySQL Database? i need to using MySQL Database to Master & Work Repository.
    I try to add mysql libary jar file to drivers . But , can't display MySQL Technology in Database List for Create Master Repository ?
    Please..
    Edited by: MadoatZ on Feb 19, 2011 1:47 AM

    Creation of ODI master repository is limited to few relational databases only. Check certification matrix for ODI 11g
    Oracle 10.2.0.4+
    Oracle 11.1.0.7+
    Oracle 11.2.0.1+
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    IBM DB2/UDB 9.7 and later FixPaks
    IBM DB2/400 (V5R4+)
    Hypersonic SQL 1.7.3+
    Sybase AS Enterprise 15.0.x
    thanks

  • Can' t connect Java with MySQL

    My goal is to connect Java with MySQL. I found many solutions on Internet, but I always get the same mistake:
    SQLException: No suitable driver
    SQLState: 08001
    VendorError: 0MySQL works fine alone or with php.Only thing left me to think is that the installed versions are not compatible for this mysql-connector-java-5.0.4
    I don't believe that could be a reason.
    Installed versions are:
    Apache Tomcat 5.5.20 Server
    Apache HTTP Server 2.2.4
    PHP 5.2.0
    MySQL 5.2
    jre 1.5.0_11
    jdk1.5.0_11
    Apache Tomacat JK2 connector Version: 1.2.20 File Name: mod_jk-apache-2.2.3.so
    mysql-connector-java-5.0.4
    I also set connector in class path: C:\mysql-connector-java-5.0.4;C:\mysql-connector-java-5.0.4\mysql-connector-java-5.0.4-bin.jar;C:\mysql-connector-java-5.0.4\src\com\mysql\jdbc
    For installation I used manulas from:
    http://apacheguide.org/jsp.php
    http://doc.51windows.net/mysql/?url=/MySQL/ch23s03.html
    Here is also a test code in java:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
       public class Connect
           public static void main (String[] args)
               Connection conn = null;
               try {
        conn =
           DriverManager.getConnection("jdbc:mysql://localhost/first_test" +
                                       "user=monty&password=greatsqldb");
        // Do something with the Connection
    } catch (SQLException ex) {
        // handle any errors
        System.out.println("SQLException: " + ex.getMessage());
        System.out.println("SQLState: " + ex.getSQLState());
        System.out.println("VendorError: " + ex.getErrorCode());
       }i'm desperate, please help or tell me someone who'll know the answer.
    Thank You in advance

    hey buddy .. it seems yr code is wrong .. in getconnection () method u should also specify the port ,which u r not doing ...
    the default port for MySQL is 3306 ... see below i am giving you a sample code ... its working fine .. and dont forget to put the MySQL driver jar path in to classpath and also copy the jar into common/lib folder of your tomcat ....
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class MySQLConnectionTest {
         public static void main(String[] args) {
    new MySQLConnectionTest().connTest();
    public void connTest() {
              String tableName = "portfolio"; //change as per setting
              String hostName = "10.81.9.39"; // please change for the target database ip or hostname
              String dbPort = "3306"; //change if not using the default
              String dbName = "tradingsystem"; //change as per the given DB name
              String username = "root"; //change as per setting
              String password = "password"; //change as per setting
              System.out.println("before try");
              Double data=0.0;
         Double data1=0.0;
              try {
    Class.forName("org.gjt.mm.mysql.Driver");
                   System.out.println("before driver manager");
    Connection conn = DriverManager.getConnection("jdbc:mysql://"+hostName+":"+dbPort+"/"+dbName, username, password);
    String query1 = "select * from "+tableName+" where User_id='trader1' and Stock_Type='Equity'";
    System.out.println("quesry1="+query1);
    Statement stmt = conn.createStatement();
    ResultSet rs1 = stmt.executeQuery(query1);
    while(rs1.next())
         System.out.println("hiiiiii for rs1");
         System.out.println(rs1);
         Quantity=(Integer)rs1.getObject(5);
         MarketPrice=(Double) rs1.getObject(8);
         data=Quantity*MarketPrice;
         data1+=data;
         System.out.println("data1="+data1);
         i=0;
    rs1.close();
    stmt.close();
    conn.close();
    } catch (ClassNotFoundException e) {
    e.printStackTrace(System.err);
    } catch (SQLException e) {
    e.printStackTrace(System.err);
    i hope it will work for u...
    cheers,

  • Connectivity java with mySql

    Hi
    Can any one tell me how should i connect my java application with mySql database here is the small code which i written.
    import java.sql.*;
    class tryjdbc
         public static void main(String[] args) throws Exception
         try
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              String connectionURL = "jdbc:mysql://localhost:3306/learn?user=root;password=";
              Connection connection = DriverManager.getConnection(connectionURL, "root", "");
              Statement statement = connection.createStatement();
              ResultSet rs = statement.executeQuery("Select ecode from emp");
              while (rs.next())
                   System.out.println(rs.getString("ecode"));
              catch (Exception e){
                   System.out.println(e);
    Can any one please tell me the error there is no eror in compiling but at run time it gives error
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    Thanks in advance
    Dhiraj

    Hi Dhiraj,
    String connectionURL = "jdbc:mysql://localhost:3306/learn?user=root;password=";
    Connection connection = DriverManager.getConnection(connectionURL, "root", "");
    It seems to be your trying to pass twice of your properties details. One from through URL and another from by pasing the parameters on getConnection() method. Better to avoid to use two place in same application. and one more thing I want to confirm r u using "stable" Driver or "alpha" Driver.
    Raju

  • Date Problem in Java with MySql

    Hello
    I am using Java with Mysql.I want to enter date in some in my format(YYYY:MM:DD:HH:MM:SS), this thing i have convert using format class and format class return date in String and iwwnat to insert this value in MySQL Table,So i want to know how can i convert String value in Date for Mysql is their inbuild function for converting string into date in mysql.
    Regards
    Anupam S

    Use PreparedStatement and SimpleDateFormat classes
    http://onesearch.sun.com/search/onesearch/index.jsp?qt=%2BPreparedStatement+%2BSimpleDateFormat+&qp=siteforumid%3Ajava48&chooseCat=allJava&col=developer-forums&site=dev

  • Need to re-download PHP Event Calendar with MySQL Database

    How do I re-download PHP Event Calendar with MySQL Database purchased earlier.  I need link without having to repurchase.

    This has nothing to do with Adobe or Dreamweaver.  Contact the company from whom you purchased your extension or widget.
    Nancy O.

  • How to connect Java to oracle Database Express Edition?

    Anyone can help me?
    How to connect JAVA TO ORACLE DATABASE EXPRESS EDITION?

    I suggest you to read this article:
    http://wiki.oracle.com/page/JDBC
    Regards,
    Ricky

  • How to connect java in mysql....

    how to connect java in mysql.... help me guys
    am newbie...

    http://www.mysql.com/products/connector/j/
    download the JDBC driver and read the docs.
    if you don't know JDBC, Google for "Sun JDBC tutorial" and study it.
    don't ask for sample code. there's plenty out there.
    %

  • How make dynamic site with MUSE

    Howdy, i want ask how make dynamic site with muse, can it intergated with CMS like wordpress, joomla, drupal etc?
    Thanks,
    best regard,
    harles

    Hello Harles,
    The CMS functionality till now is only supported with Muse while using Business Catalyst as host.
    Please refer to forum posts : http://forums.adobe.com/message/4418294?tstart=0 and http://forums.adobe.com/message/4776241#4776241 .
    Hope this helps.
    Regards,
    Sachin

  • Is it possible to connect the java with XL database

    Hi friends,
    Is it possible to connect the java with XL database.
    if it is possible can u send the detail for that .
    Thnax in Advance..............

    What the heck is a XL database?

  • How to connect APEX with MYSQL via Apex's Database link

    How do i connect APEX with MYSQL via Apex's Database link? The OBE doesn't go into specific detail about how to link the two.
    can someone please elaborate on what these are and where i can find them in mysql:
    Database Link Name      
    Connect To Schema      
    Password      
    Remote Hostname or IP      
    Remote Host Port      
    SID or Service Name      
    I need to link to mysql database so I can set up a 3D pie chart in apex

    Hi jononioo
    A database link is a device for connecting between Oracle database instances only. Oracle does have a method for connecting to other database systems (Transparent Gateway) but this is restricted to other commercial databases and I don't believe there is a gateway for Mysql. (I could be wrong)
    I don't know Mysql but maybe there is some way to push data to the Oracle instance. Other than that, is there any reason why the data has to reside in the Mysql database?
    Regards
    Andre

  • How can I use a mySQL database schema with numeric auto increment primary key instead of GUID?

    Hello!
    I'm using the TestStand "MySQL Insert (NI)" database schema with GUID as primary key. So everything works fine.
    But I prever using numeric values as primary key, because the database is in conjunction with another database which uses numeric values as primary key.
    Is this possible?
    Has anyone an idea how I can modify the "Generic Recordset (NI)" for use with MySQL?
    Thanks!
    Configuration:
    Microsoft Windows XP
    TestStand 3.1
    MySQL 4.1.12a
    MySQL ODBC 3.51 Driver
    Brosig

    Adam -
    The TestStand Database Logging feature does not allow you to run a separate SQL command after executing the command for a statement(table), so I do not think that you can use an auto incrementing column for the tables. There is just no way to get it back in a generic way. One option that I tried is something similar to the Oracle schema where you call a store procedure to return a sequence ID for each record that you want to add.
    So you would have to create the following sequence table in MySQL:
    CREATE TABLE sequence (id INT NOT NULL);
    INSERT INTO sequence VALUES (0);
    Then create a stored procedure as shown below that will increment the sequence value and return it in a recordset:
    CREATE PROCEDURE `getseqid`()
    BEGIN
            UPDATE sequence SET id=LAST_INSERT_ID(id+1);
            SELECT LAST_INSERT_ID();
    END
    Then update the MySQL tables to use INT primary and foreign key values, so the TestStand MySQL SQL file to create all tables would have text like this:
    CREATE TABLE UUT_RESULT
     ID    INT  PRIMARY KEY,
    ~
    CREATE TABLE STEP_RESULT
     ID    INT  PRIMARY KEY,
     UUT_RESULT   INT  NOT NULL,
    ~
    Then update the schema primary and foreign key columns in the TestStand Database Options dialog box to be INT to match the table. For the primary key columns, you will have to set the Primary Key Type to "Get Value from Recordset" and set the Primary Key Command Text to "call getseqid()". This will call the stored procedure to determine the next value to use as the ID value.
    Hope this helps...
    Scott Richardson
    National Instruments

Maybe you are looking for

  • My PC can see the macbook files, macbook can't see PC files

    I received my macbook pro yesterday and decided to try and network the two so that I could transfer my files from my PC to the mac. The PC is connected to the internet using a linksys router and uses ethernet to connect. The Mac is connected by the a

  • Error launching CMC

    BO XI r2 Windows 2003 Server 64bit http://localhost8080/businessobjects/enterprise115/adminlaunch/launchpad.html I can log into 'Administrative Tool Console' When I try and launch CMC - I get message - 'HTTP Status 404' - The requested resource is no

  • Der Verflüssigungsfilter funktioniert nicht

    Hallo. der Verflüssigungsfilter bei Photoshop CC funktioniert nicht. Er zeigt das Bild komplett in blau, ohne Kontrast bzw Konturen sodass man nicht damit arbeiten kann. Ich hoffe Ihr habt eine Lösung für mich. Mit freunldichen Großen julythe92

  • Setup System Monitoring link disappear in DSWP

    Hi All! Could anybody help me? I  try to setup System Monitoring. But when I selected System Monitoring tab I saw Setup System Monitoring link disappear. Thanks for your advance, Alexander Ganiiishev

  • Pro not opening after i enter my user and password

    pro not opening after i enter user and pass