首页 > 编程语言 >freeswitch编译java esl

freeswitch编译java esl

时间:2023-01-04 15:01:42浏览次数:39  
标签:esl java usr freeswitch home include

一、背景
假设源代码路径为/home/freeswitch

二、编译安装libesl.a
1. cd /home/freeswitch(源代码的根目录)

执行./configure,以便生成必要的Makefile文件。

2. cd /home/freeswitch/libs/esl

make && make install

3. 默认libesl.a安装在/usr/local/freeswitch/lib目录下

需要拷贝到/home/freeswitch/libs/esl目录下

因为esl的Makefile默认libesl.a这个库文件在当前目录

三、编译esl.jar和libesljni.so

1. 修改java模块的Makefile
  cd /home/freeswitch/libs/esl/java 
  默认的关于java头文件的配置
  LOCAL_CFLAGS=-I../src/include -I/usr/java/jdk1.6.0_14/include -I/usr/java/jdk1.6.0_14/include/linux -I/usr/lib/jvm/java-6-openjdk/include/ -I/usr/lib/jvm/java/include -I/usr/lib/jvm/java/include/linux
  修改为机器的实际路径,例如

LOCAL_CFLAGS=-I../src/include -I/usr/java/jdk1.8.0_112/include -I/usr/java/jdk1.8.0_112/include/linux

2. 编译

    cd /home/freeswitch/libs/esl(返回上一级目录)

make javamod

3. cd /home/freeswitch/libs/esl/java

如果一切顺利的话,你能看到esl.jar和libesljni.so这两个文件。

OK,可以在java中通过jni调用libesljni.so库了。

标签:esl,java,usr,freeswitch,home,include
From: https://www.cnblogs.com/kn-zheng/p/17024820.html

相关文章

  • Java程序(非web)slf4j整合Log4j2
    一、依赖包准备//slf4j项目提供compilegroup:'org.slf4j',name:'slf4j-api',version:'1.7.25'//log4j2项目提供compilegroup:'org.apache.logging.log4j',na......
  • JAVA命令行编译及运行
    第一部分:单文件一、背景目标文件HelloWorld.javapackageccdate;publicclassHelloWorld{publicstaticvoidmain(String[]args){......
  • sun.security.validator.ValidatorException: PKIXpath building failed: sun.securit
    报错信息:javax.net.ssT.SSLHandshakeExceptions.certpath.SunCertPathBuilderException:unabletofindvalidcertificationpathtoreguestedtarget问题描述:在ja......
  • Java调用Linux命令(cd的处理)
    一、Java调用Linux系统的命令非常简单这是一个非常常用的调用方法示例:1publicStringexecuteLinuxCmd(Stringcmd){2System.out.println("gotcmd......
  • [java] a simple Applet program
    //javacodefileimportjavax.swing.*;importjava.awt.*;importjava.awt.event.*;importjava.net.*;publicclassWelcomeAppletextendsJApplet{publicvoidinit()......
  • [java]Regular Expression Testor
    importjava.awt.Dimension;importjava.awt.GridBagConstraints;importjava.awt.GridBagLayout;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListene......
  • Java线程生命周期
    java.lang.Thread类包含一个静态枚举,它定义了它的潜在状态。在任何给定的时间点内,线程只能处于以下状态之一:NEW–一个新创建的线程,尚未开始执行RUNNABLE–正在运行......
  • 第五阶段:Java Web 核心技术
    认清现实,放弃幻想。(特此感谢动力节点老杜分享出来的学习路线)5.第五阶段:JavaWeb核心技术5.1Tomcat与HTTP5.1.1学习目标1.掌握Tomcat服务器搭建2......
  • java spring jar包下载
    想学习一下javaspring,真是不知道怎么来着手。在网上查了一下eclipse里建spring工程的方法:1、创建Java项目转到 文件菜单- 新建- 项目- Java项目。输入项目名称,例如......
  • self hosted private support chat software use JavaScript remove HTML tags
    ThemainreasonforremovingHTMLtagsinonlinecustomerservicesystemsistopreventmalicioususersfromattackingthewebsiteorotherusersbyinputting......