Freeswitch mod_java安装问题
我正在尝试在 ubuntu 上安装 mod_java 。
- 我已经安装了最新的java(1.6)。
- 我已经配置了 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.
- I have installed the latest java(1.6).
- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我也有同样的问题。解决方案是使用选项 --with-java 运行配置:
我不知道它是否有任何区别,但我在构建没有它的 freeswitch 后添加了 mod_java 。它在我的 module.conf.xml 中的初始构建中被禁用,但后来我运行了上面的命令加上:
I had the same problem. The solution was to run configure with the option --with-java:
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:
它在带有 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.
键入此 linux 命令以在文件系统上找到 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.
you should be able to get it somewhere
in
/usr/lib/java
directory or some other directorydepending 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.
在最新的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 \