Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32904 > unrolled thread

How to put JDBC-ODBC bridge into JAR

Started byXue Feng <xf.lotus@yahoo.com>
First post2015-10-20 20:23 +0800
Last post2015-10-21 09:31 +0200
Articles 8 — 5 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  How to put JDBC-ODBC bridge into JAR Xue Feng <xf.lotus@yahoo.com> - 2015-10-20 20:23 +0800
    Re: How to put JDBC-ODBC bridge into JAR Eric Douglas <e.d.programmer@gmail.com> - 2015-10-20 06:02 -0700
      Re: How to put JDBC-ODBC bridge into JAR Arne Vajhøj <arne@vajhoej.dk> - 2015-10-20 20:33 -0400
        Re: How to put JDBC-ODBC bridge into JAR Eric Douglas <e.d.programmer@gmail.com> - 2015-10-21 05:16 -0700
          Re: How to put JDBC-ODBC bridge into JAR Martin Gregorie <martin@address-in-sig.invalid> - 2015-10-21 15:40 +0000
          Re: How to put JDBC-ODBC bridge into JAR Arne Vajhøj <arne@vajhoej.dk> - 2015-10-21 21:00 -0400
    Re: How to put JDBC-ODBC bridge into JAR Arne Vajhøj <arne@vajhoej.dk> - 2015-10-20 20:34 -0400
      Re: How to put JDBC-ODBC bridge into JAR Silvio <silvio@internet.com> - 2015-10-21 09:31 +0200

#32904 — How to put JDBC-ODBC bridge into JAR

FromXue Feng <xf.lotus@yahoo.com>
Date2015-10-20 20:23 +0800
SubjectHow to put JDBC-ODBC bridge into JAR
Message-ID<n05bkc$i7g$1@speranza.aioe.org>
Hi,

    I am trying to develop a java program running on windows, which is 
to make use of a ACCESS database. To this end, JDK 7 is used because it 
includes JDBC-ODBC bridge which is not included in JDK 8 any more. 
However, the running environment is required to install JRE 8. So, when 
running, the program will fail to access the database. Netbeans is my 
IDE, and I use it to generate JAR which can run directly. I have 
unpacked the JAR file, and there is no JDBC-ODBC bridge in it at all. I 
wonder how I can pack JDBC-ODBC bridge into the jar file. Thx.

[toc] | [next] | [standalone]


#32905

FromEric Douglas <e.d.programmer@gmail.com>
Date2015-10-20 06:02 -0700
Message-ID<76a00d57-057b-49f9-864c-67c8e4abc8e0@googlegroups.com>
In reply to#32904
On Tuesday, October 20, 2015 at 8:21:59 AM UTC-4, Xue Feng wrote:
> Hi,
> 
>     I am trying to develop a java program running on windows, which is 
> to make use of a ACCESS database. To this end, JDK 7 is used because it 
> includes JDBC-ODBC bridge which is not included in JDK 8 any more. 
> However, the running environment is required to install JRE 8. So, when 
> running, the program will fail to access the database. Netbeans is my 
> IDE, and I use it to generate JAR which can run directly. I have 
> unpacked the JAR file, and there is no JDBC-ODBC bridge in it at all. I 
> wonder how I can pack JDBC-ODBC bridge into the jar file. Thx.

I don't know anything about the bridges, but you can access MS Access files directly using JDBC with the jackcess jar in your classpath.
http://jackcess.sourceforge.net/

[toc] | [prev] | [next] | [standalone]


#32913

FromArne Vajhøj <arne@vajhoej.dk>
Date2015-10-20 20:33 -0400
Message-ID<n06mg7$ni9$1@speranza.aioe.org>
In reply to#32905
On 10/20/2015 9:02 AM, Eric Douglas wrote:
> On Tuesday, October 20, 2015 at 8:21:59 AM UTC-4, Xue Feng wrote:
>> I am trying to develop a java program running on windows, which is
>> to make use of a ACCESS database. To this end, JDK 7 is used
>> because it includes JDBC-ODBC bridge which is not included in JDK 8
>> any more. However, the running environment is required to install
>> JRE 8. So, when running, the program will fail to access the
>> database. Netbeans is my IDE, and I use it to generate JAR which
>> can run directly. I have unpacked the JAR file, and there is no
>> JDBC-ODBC bridge in it at all. I wonder how I can pack JDBC-ODBC
>> bridge into the jar file. Thx.
>
> I don't know anything about the bridges, but you can access MS Access
> files directly using JDBC with the jackcess jar in your classpath.
> http://jackcess.sourceforge.net/

That library may be a very good choice.

Just note that it does not support JDBC but only its
own API.

http://jackcess.sourceforge.net/faq.html#jdbc

Arne


[toc] | [prev] | [next] | [standalone]


#32916

FromEric Douglas <e.d.programmer@gmail.com>
Date2015-10-21 05:16 -0700
Message-ID<a77cb0c9-31a7-4529-86dd-71f983fca9fb@googlegroups.com>
In reply to#32913
On Tuesday, October 20, 2015 at 8:33:23 PM UTC-4, Arne Vajhøj wrote:
> Just note that it does not support JDBC but only its
> own API.

OK, I must have remembered it incorrectly.  I did write a test program that reads MS Access through straight JDBC and I have the jackcess jar in my classpath, but I also have the ucanaccess jar.
http://ucanaccess.sourceforge.net/site.html

[toc] | [prev] | [next] | [standalone]


#32917

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2015-10-21 15:40 +0000
Message-ID<n08bm3$37g$1@dont-email.me>
In reply to#32916
On Wed, 21 Oct 2015 05:16:03 -0700, Eric Douglas wrote:

> On Tuesday, October 20, 2015 at 8:33:23 PM UTC-4, Arne Vajhøj wrote:
>> Just note that it does not support JDBC but only its own API.
> 
> OK, I must have remembered it incorrectly.  I did write a test program
> that reads MS Access through straight JDBC and I have the jackcess jar
> in my classpath, but I also have the ucanaccess jar.
> http://ucanaccess.sourceforge.net/site.html

Yep. I have a note saying that jaccess is standalone while ucanaccess a 
back end to the JDBC interface package.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#32925

FromArne Vajhøj <arne@vajhoej.dk>
Date2015-10-21 21:00 -0400
Message-ID<n09cem$grp$1@speranza.aioe.org>
In reply to#32916
On 10/21/2015 8:16 AM, Eric Douglas wrote:
> On Tuesday, October 20, 2015 at 8:33:23 PM UTC-4, Arne Vajhøj wrote:
>> Just note that it does not support JDBC but only its own API.
>
> OK, I must have remembered it incorrectly.  I did write a test
> program that reads MS Access through straight JDBC and I have the
> jackcess jar in my classpath, but I also have the ucanaccess jar.
> http://ucanaccess.sourceforge.net/site.html

Ah - that looks like a pretty cool combo.

Arne

[toc] | [prev] | [next] | [standalone]


#32914

FromArne Vajhøj <arne@vajhoej.dk>
Date2015-10-20 20:34 -0400
Message-ID<n06mir$ni9$2@speranza.aioe.org>
In reply to#32904
On 10/20/2015 8:23 AM, Xue Feng wrote:
>     I am trying to develop a java program running on windows, which is
> to make use of a ACCESS database. To this end, JDK 7 is used because it
> includes JDBC-ODBC bridge which is not included in JDK 8 any more.
> However, the running environment is required to install JRE 8. So, when
> running, the program will fail to access the database. Netbeans is my
> IDE, and I use it to generate JAR which can run directly. I have
> unpacked the JAR file, and there is no JDBC-ODBC bridge in it at all. I
> wonder how I can pack JDBC-ODBC bridge into the jar file. Thx.

There are a few alternatives available.

But have you considered switching from MS Access to something else?

Arne

[toc] | [prev] | [next] | [standalone]


#32915

FromSilvio <silvio@internet.com>
Date2015-10-21 09:31 +0200
Message-ID<56273f5f$0$23758$e4fe514c@news.xs4all.nl>
In reply to#32914
On 10/21/2015 02:34 AM, Arne Vajhøj wrote:
> On 10/20/2015 8:23 AM, Xue Feng wrote:
>>     I am trying to develop a java program running on windows, which is
>> to make use of a ACCESS database. To this end, JDK 7 is used because it
>> includes JDBC-ODBC bridge which is not included in JDK 8 any more.
>> However, the running environment is required to install JRE 8. So, when
>> running, the program will fail to access the database. Netbeans is my
>> IDE, and I use it to generate JAR which can run directly. I have
>> unpacked the JAR file, and there is no JDBC-ODBC bridge in it at all. I
>> wonder how I can pack JDBC-ODBC bridge into the jar file. Thx.
>
> There are a few alternatives available.
>
> But have you considered switching from MS Access to something else?
>
> Arne
>
>
My thought as well. Simply bundle H2 and you have an actual database 
(which Access is not) which is probably a lot more lightweight at the 
same time.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web