“未定义符号:SQLAllocEnv"; Java中的错误 [英] "undefined symbol: SQLAllocEnv" error in Java

查看:307
本文介绍了“未定义符号:SQLAllocEnv"; Java中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java来构建需要使用MS Access的应用程序. 运行项目时出现以下错误:

I am using java to build an application which requires to use MS Access. I am geting the following error when I run the project:

/usr/lib/jvm/jdk1.7.0/bin/java:符号查找错误:/usr/lib/jvm/jdk1.7.0/jre/lib/i386/libJdbcOdbc.so:未定义符号:SQLAllocEnv

/usr/lib/jvm/jdk1.7.0/bin/java: symbol lookup error: /usr/lib/jvm/jdk1.7.0/jre/lib/i386/libJdbcOdbc.so: undefined symbol: SQLAllocEnv

这是什么意思?

推荐答案

正如您在上一个问题中提到的那样,您就是试图在Linux(Ubuntu)中进行开发,以便最终将其部署在Windows上.我怀疑您正在尝试在Linux中使用JDBC-ODBC Bridge而不安装适当的驱动程序软件.

As you mention in your previous question you are trying to do development in Linux (Ubuntu) for a project that will ultimately be deployed on Windows. I suspect that you are trying to use the JDBC-ODBC Bridge in Linux without having the appropriate driver software installed.

我已经看到许多答案,它们涉及在Linux下使用unixODBCMDB Tools来操作Access数据库,但是根据我自己的经验,效果并不理想.相反,我会提供以下建议:

I have seen many answers that talk about using unixODBC and MDB Tools to manipulate an Access database under Linux, but in my own experience that hasn't worked out very well. Instead I would offer the following advice:

  • 如果要为Windows开发项目,请在Windows下进行开发.然后,您可以使用JDBC-ODBC桥和实际的Microsoft Access ODBC驱动程序.但是,请记住,如先前答案在此处.

如果您必须在Linux下进行开发,请使用 UCanAccess (或者可能只是 Jackcess ,UCanAccess将该文件用作访问数据库文件的下层接口) ),并在您的应用程序中部署所需的组件.

If you must do your development under Linux then use UCanAccess (or perhaps just Jackcess, which UCanAccess uses as its lower-level interface to Access database files) and deploy the required components with your application.

这篇关于“未定义符号:SQLAllocEnv"; Java中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆