Menu

How generate .jar with UcanAccess connection.

Help
2015-01-06
2022-01-25
  • Christian UT

    Christian UT - 2015-01-06

    I don't know how generate a .jar functional with UcanAccess connection, I try to do, but I find no way to run after being compiled.

    thanks for your help.

     
  • Marco Amadei

    Marco Amadei - 2015-01-07

    Hi Christian,
    your question isn't understandable to me: what does "a .jar functional with UcanAccess connection" mean? What exactly are you trying to do?
    Cheers Marco

     
  • Christian UT

    Christian UT - 2015-01-07

    ok, I need compile a program of java in .jar, this program has a connection with ucanaccess. In development time this program runs fine, but when I compile this program in a .JAR, not establish the connection to the database.

    Thanks.

     
  • Marco Amadei

    Marco Amadei - 2015-01-07

    You likely did something wrong in the code(the file path in the jdbc connection url is relative?). Or the classpath is wrong. Or something else.
    Impossible to help you without an axception message or an axception stack trace.
    Notice that Java programs are compiled in .class files, .jar files are just archives containing .class files.

     
  • Christian UT

    Christian UT - 2015-01-07

    Yes, in eclipse I run this program and all fine. but the problem is after compilation.
    I run the .jar file, and it run fine, but when I make a operations or wherever nothing happens, it is as if the database does not exist
    not send errors.
    this is my code.

     
  • Marco Amadei

    Marco Amadei - 2015-01-08

    Hi Christian,
    I haven't evidence of errors in your code, but I can't help you using the informations you provided. It doesn't seem to be a ucanaccess problem, but general java:
    there mustn't be differences between an execution in eclipse and using a jar.
    You should probably review your configuration in the second case(e.g. classpath configuration), you probably did errors there.

     
  • Christian UT

    Christian UT - 2015-01-08

    Thanks for your post.

    I solved the problem thinking about something you wrote."I haven't evidence of errors in your code", I imported the project in netbeans, and build it. The .JAR now is running fine and the connection works fine. The problem is in eclipse. thanks for your idea.

     
  • Christian UT

    Christian UT - 2015-01-08

    Thanks for your post.

    I solved the problem thinking about something you wrote."I haven't evidence of errors in your code", I imported the project in netbeans, and build it. The .JAR now is running fine and the connection works fine. The problem is in eclipse. thanks for your idea.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.