Freeswitch mod_java安装问题

发布于 2024-10-27 09:18:47 字数 370 浏览 8 评论 0原文

我正在尝试在 ubuntu 上安装 mod_java 。

  1. 我已经安装了最新的java(1.6)。
  2. 我已经配置了 freeswitch,并在 module.conf.xml 中启用了 mod_java 模块

,然后当我运行 make 文件时,它显示:

freeswitch_java.h:5:17: error: jni.h: No such file or directory

I have searched through the java installtion文件夹,但没有找到任何include文件夹或jni.h。

任何人都可以帮忙,这里出了什么问题。

感谢您阅读这个问题。

I am trying to install mod_java on ubuntu.

  1. I have installed the latest java(1.6).
  2. I have configured freeswitch with mod_java module enabled in module.conf.xml

then when i run the make file, it says:

freeswitch_java.h:5:17: error: jni.h: No such file or directory

I have searched through the java installtion folders, but did not find any include folder or jni.h.

Can anyone help, what is being the problem here.

Thanks for reading this question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

幸福不弃 2024-11-03 09:18:47

我也有同样的问题。解决方案是使用选项 --with-java 运行配置:

./configure --with-java=/usr/lib/jvm/java-1.6.0-openjdk/include/

我不知道它是否有任何区别,但我在构建没有它的 freeswitch 后添加了 mod_java 。它在我的 module.conf.xml 中的初始构建中被禁用,但后来我运行了上面的命令加上:

make mod_java-install

I had the same problem. The solution was to run configure with the option --with-java:

./configure --with-java=/usr/lib/jvm/java-1.6.0-openjdk/include/

I don't know if it makes any difference but I added mod_java after building freeswitch without it. It was disabled in my initial build in module.conf.xml but afterwards I ran the above command plus:

make mod_java-install
ゃ懵逼小萝莉 2024-11-03 09:18:47

它在带有 openjdk 的 ubuntu 上对我有用。您使用的是 Sun JDK 吗?也许在您的版本中没有包含源文件的包含文件夹。尝试安装其他 JDK。或者尝试查看 apt 中是否有其他一些相关的软件包,它们将为您提供包含文件夹。

It worked for me on ubuntu with openjdk. Are you using the Sun JDK? Maybe in the version you have dont have the include folder which has the source files. Try installing the other JDK. Or try and see of ther are some other related packages in apt that will get you the include folder.

梦里°也失望 2024-11-03 09:18:47

键入此 linux 命令以在文件系统上找到 jni.h 文件。

locate jni.h

你应该能在某个地方找到它
/usr/lib/java 目录或其他目录中
取决于你的java home。

将 jni.h 复制粘贴到 freeswitch src 的 src/include 文件夹中。
对于不同的 .h 文件,它会抛出更多错误
只需将它们全部复制到您的 src/include 文件夹中即可。

Type this linux command to locate your jni.h file on your filesystem.

locate jni.h

you should be able to get it somewhere
in /usr/lib/java directory or some other directory
depending upon your java home.

copy paste the jni.h in src/include folder of your freeswitch src.
It will throw you some more errors for different .h files
just copy all of them to your src/include folder.

是你 2024-11-03 09:18:47

在最新的freeswitch中,通过Makefile安装,无法在Makefile下载和安装时进行配置。可以通过修改 Makefile.in 文件添加包含路径

mod_java_la_CPPFLAGS

-I/usr/lib/jvm/default-java/include \

in latest freeswitch, installing through Makefile, its not possible to configure as the Makefile downloads and installs. Its possible by modifying the Makefile.in file to add the include path

mod_java_la_CPPFLAGS

-I/usr/lib/jvm/default-java/include \

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文