Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 10 of 10

Thread: Heloo!

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Heloo!

    Hi there,

    I am new on this forum and i found it very useful for the java
    programmers.

    I need your help:

    Recently i developed an application that connects with sql database(I am using using WAMP server)
    and everything is working really perfect when i compile my code.
    I created a setup for my application and it is running but the problem is that it can't connect with my database.
    I used both Launch4j and Inno setup compiler to build my setup.

    Can anyone help me out?

    Thx


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Heloo!

    Quote Originally Posted by Dios View Post
    Can anyone help me out?
    yes, read this link

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Heloo!

    Moved from Member Introductions

    I'd also recommend describing the problem in detail - can't connect to my database says nothing about any exceptions being thrown which describe the route cause. And for future reference, I'd also recommend more descriptive title when posting

  4. #4
    Junior Member
    Join Date
    Jul 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Heloo!

    Thx jps, i now posted my prob in the correct forum.

  5. #5
    Junior Member
    Join Date
    Jul 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Heloo!

    I finally realized that some one moved my post in the correct forum, thx.Sorry for disturbing you i think it os because i am new on this forum but it won't happen agin to make such mistakes.
    Following the copeg remark, the thrown exception is : java.lang.ClassNotFoundException:com.mysql.jdbc.Dr iver

  6. #6
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Heloo!

    You need to add the database driver to the classpath. Search the internet for how to do this with your particular IDE (command line, Eclipse, Netbeans, etc...each have a slightly different method for doing so)

  7. #7
    Junior Member
    Join Date
    Jul 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Heloo!

    Thx copeg, i tried to add the database driver in my classpath but still the problem is the same. The Jar files of my java-database connectors are located in the JRE folder now i put them in the libraries of my IDE (netbeans 7) but still there is no change o the setup. My application connects to the database only when i run it directly from the IDE not with the created setup. I wonder whether the Innno setup compiler is limited for this kind of applications or not. I would appreciate if anyone could recommend me another open source software which can perform this task or indicate me the proper way i can do it using Inno setup compiler.
    Thx

  8. #8

    Default Re: Heloo!

    Does the setup application copy the JDBC driver into JRE's lib folder? or
    Does the application's manifest file contain a reference to the JDBC driver?

  9. #9
    Junior Member
    Join Date
    Jul 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Heloo!

    Actually this where th eproblem resides. How can i incorporate the Database into the Inno setup compiler. Because the application
    is perfectly running and access the database when i compile it from the IDE but it throws the exception when i try to access the database from the created setup!

  10. #10
    Junior Member
    Join Date
    Jul 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Heloo!

    I finally solved the problem. I put the database driver in the same directory
    where my application is installed and everything is working as i wanted.
    Thx guyz for your suggestions