构建ubuntu下的JXTA-C开发环境

概述:

因为网络上关于这个JXTA-C源码编译的文章较少,所以我在此首先写一份编译的完整过程,以供网友们参考。

JXTA-C源码所在地址:http://download.java.net/jxta/

1、操作系统环境

[email protected]:~$ cat /etc/issue
Ubuntu 12.04.4 LTS \n \l

[email protected]:~$ file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x83531f308f1fa18221be53eaf399303400c14638, stripped

2、安装编译JXTA-C源码所需的基本库

[email protected]:~$ sudo apt-get install -y libtool automake autoconf libxml2 libxml2-dev libapr1-dev libaprutil1-dev
[sudo] password for leekwen:
Reading package lists... Done
Building dependency tree
Reading state information... Done

3、下载JXTA-C-2.5.2.tar.bz2源码包

[email protected]:~$ wget -c http://download.java.net/jxta/jxta-c/2.5.2/jxta-c-2.5.2.tar.bz2

4、测试APR及APU的环境是否安装OK?

[email protected]:~$ apr-config --includedir
/usr/include/apr-1.0
[email protected]:~$ apu-config --includedir
/usr/include/apr-1.0
[email protected]:~$ grep APU_HAVE_DB /usr/include/apr-1.0/apu.h
#define APU_HAVE_DB     1
#if APU_HAVE_DB
#define APU_HAVE_DB_VERSION    5

5、配置JXTA-C源码

[email protected]:~$ tar jxvf jxta-c-2.5.2.tar.bz2
[email protected]:~$ cd jxta-c-2.5.2
[email protected]:~/jxta-c-2.5.2$ ./configure --without-apr --with-dbm=db

如果没有缺少库文件的错误的话,最终会显示出如下的配置:

JXTA has been configured with the following options:
                  Debug enabled : no
                  Compression enabled : yes
                  Decompression enabled : yes
                  Mono support enabled : no
                  libxml2 Path : /usr
                  APR Path :
                  APU Path :
                  sqlite Path : /usr
                  openssl Path : /usr
                  Thread pool availability: jxta/jpr

6、编译JXTA-C源码

[email protected]:~/jxta-c-2.5.2$ make -j 2

结果如下:

creating whisp
make[2]: Leaving directory `/home/leekwen/jxta-c-2.5.2/tutorials‘
make[2]: Entering directory `/home/leekwen/jxta-c-2.5.2‘
make[2]: Leaving directory `/home/leekwen/jxta-c-2.5.2‘
make[1]: Leaving directory `/home/leekwen/jxta-c-2.5.2‘

7、运行jxtashell

[email protected]:~/jxta-c-2.5.2$ cd shell/
[email protected]:~/jxta-c-2.5.2/shell$ ./jxtaShell
Starting logger with selector : *.warning-fatal
[JXTA]-warning-[05/19 00:34:30:863264][TID: 0xb70ba700] - [jxta_tta.c:386] Deprecated API jxta_TCPTransportAdvertisement_set_InterfaceAddress called.
[CM]-error-[05/19 00:34:30:930237][TID: 0xb70ba700] - Failed to load driver file apr_dbd_sqlite3.so
[CM]-error-[05/19 00:34:30:931425][TID: 0xb70ba700] - db_id: 1 -- error creating tables db return 20019
[CM]-error-[05/19 00:34:30:932410][TID: 0xb70ba700] - Failed to open dbd database: .cm/jxta-NetGroup.sqdb with error 20019
[CM]-error-[05/19 00:34:30:933554][TID: 0xb70ba700] - Error processing address spaces -- 120007
Segmentation fault (core dumped)

如果运行jxtashell出现的错误如上的话,请安装JXTASHELL运行所依赖的连接库sqlite的库文件:

[email protected]:~/jxta-c-2.5.2/shell$ sudo apt-get install libaprutil1-dbd-sqlite3

安装完毕后,再次执行jxtashell:

[email protected]:~/jxta-c-2.5.2/shell$ ./jxtaShell
Starting logger with selector : *.warning-fatal
[JXTA]-warning-[05/19 00:36:40:275230][TID: 0xb70e5700] - [jxta_tta.c:386] Deprecated API jxta_TCPTransportAdvertisement_set_InterfaceAddress called.
[PV]-warning-[05/19 00:36:41:260503][TID: 0xb70e5700] - [jxta_peerview.c:711] Could not find the endpoint service params
[JXTA]-warning-[05/19 00:36:41:261929][TID: 0xb70e5700] - [jxta_endpoint_service.c:1416] Deprecated API jxta_endpoint_service_add_listener called.
[JXTA]-warning-[05/19 00:36:41:309777][TID: 0xb70e5700] - [jxta_endpoint_service.c:1416] Deprecated API jxta_endpoint_service_add_listener called.
=========================================================
========= Welcome to the JXTA-C Shell  Version 2.5.2 ======
=========================================================

The JXTA Shell provides an interactive environment to the JXTA
platform. The Shell provides basic commands to discover peers and
peergroups, to join and resign from peergroups, to create pipes
between peers, and to send pipe messages. The Shell provides environment
variables that permit binding symbolic names to Jxta platform objects.
Environment variables allow Shell commands to exchange data between
themselves. The shell command ‘env‘ displays all defined environment
variables in the current Shell session.

A ‘man‘ command is available to list the commands available.
To exit the Shell, use the ‘exit‘ command.

JXTA>[RELAY]-warning-[05/19 00:36:41:333294][TID: 0xb579eb40] - Not seeded with any valid relay addresses

JXTA>man
For which command do you want help?
        TestApplication
        env
        cat
        whoami
        kdb
        peers
        talk
        join
        groups
        search
        leave
        rdvstatus
        rdvcontrol
        publish
JXTA>exit
Exiting Jxta shell
[HTTP_TRANSPORT]-warning-[05/19 00:36:52:358205][TID: 0xb70e5700] - don‘t know how to stop yet.
[JXTA]-warning-[05/19 00:36:53:441809][TID: 0xb70e5700] - [jxta_endpoint_service.c:1443] Deprecated API jxta_endpoint_service_remove_listener called.
[JXTA]-warning-[05/19 00:36:53:442622][TID: 0xb70e5700] - [jxta_endpoint_service.c:1443] Deprecated API jxta_endpoint_service_remove_listener called.
[SERVICE]-warning-[05/19 00:36:53:443634][TID: 0xb70e5700] - Jxta_service_init is not called??
[SERVICE]-warning-[05/19 00:36:53:443673][TID: 0xb70e5700] - Jxta_service_init is not called??
[SERVICE]-warning-[05/19 00:36:53:443752][TID: 0xb70e5700] - Jxta_service_init is not called??
[SERVICE]-warning-[05/19 00:36:53:443767][TID: 0xb70e5700] - Jxta_service_init is not called??

到此JXTA-C的编译算是完成了!!#转载请注明出处 #
leekwen

构建ubuntu下的JXTA-C开发环境,布布扣,bubuko.com

时间: 2024-10-10 01:35:36

构建ubuntu下的JXTA-C开发环境的相关文章

ubuntu下eclipse+erlang+mongodb开发环境搭建

ubuntu下eclipse+erlang+mongodb开发环境搭建 - Linux操作系统:Ubuntu_Centos_Debian - 红黑联盟 最近公司webGame项目中用到了Erlang+MongoDB,没办法项目需要那就学呗. 学这个东西最起码得有环境吧,今天搭建开发环境就顺便记录一下,依然在ubuntu下进行开发. 顺便说下,如果做开发,最好选择linux,因为很多环境在linux下搭建很方便.win下一般也会 有相应的发法搭建,但是经常会遇到一些莫名其妙的问题.因此建议做开发的

Ubuntu下安装C/C++开发环境【!!!有更新!!!Ubuntu14.10下使用eclipse搭建C语言开发环境】

(1)第一步安装Eclipse,有两种方法.使用软件市场搜索就可以得到,安装就可以 另外一种是使用终端安装.命令例如以下: sudo su进入root模式 输入password 然后 输入:sudo apt-get install eclipse 開始安装! 至此已经全然安装eclipse 上图一张 (2)再安装CDT插件,方法例如以下: 1.启动eclipse, 2.选择Help->Install New Software....在Work with的框框下复制以下的地址:  http://d

Ubuntu下Eclipse搭建ARM开发环境

第一步:安装JRE 和 Eclipse 详细步骤请参考:http://blog.csdn.net/ex_net/article/details/7251664 第二步:安装arm-linux-gcc 和 arm-linux-g++ (1)复制 arm-linux-gcc-4.3.2.tgz 到 /home/tools 目录下,然后解压缩到  根目录下 / #   tar -xvzf arm-linux-gcc-4.3.2.tgz -C / (2)修改环境变量 # gedit /etc/envir

ubuntu下c/c++开发环境配置

刚转好的UBUNTU14.04.01 TLS . 试了一下GCC,结果如下不能编译 gcc -o hello hello.cpp gcc: error trying to exec 'cc1plus': execvp: 没有那个文件或目录 Baidu 首先是配置gcc,在ubuntu安装完成已经有gcc了(gcc是由GNU之父Stallman所开发的linux下的编译器,全称为GNU Compiler Collection, 目前可以编译的语言包括:C, C++, Objective-C, Fo

Ubuntu下安装C/C++开发环境

(1)四异步安装Eclipse,有两种方法,使用软件市场搜索即可得到,安装即可 第二种是使用终端安装,命令如下:sudo apt-get install eclipse 至此已经完全安装eclipse (2)再安装CDT插件,方法如下: 1.启动eclipse, 2.选择Help->Install New Software...,在Work with的框框下复制下面的地址:  http://download.eclipse.org/releases/galileo 3.选择Collaborati

Ubuntu Linux下如何配置Android开发环境

下载和安装Win7系统Android开发环境中讲了怎样在Win7系统中安装Android开发环境,那么怎样在Linux系统中配置Android开发环境呢?本篇文章就将演示如何使用Eclipse.Android SDK和PhoneGap在Ubuntu 11.04环境下配置Android开发环境. 以下是在Ubuntu linux系统中配置Android开发环境的几个步骤:        1.安装Eclipse和Android SDK/PhoneGap所需软件包: 打开终端,输入下面命令完成题目所述

ubuntu下进行android的开发(二):android开发环境搭建

android开发环境搭建主要分两个步骤:安装JDK及安装集成开发环境. 一.安装JDK ubuntu系统自带的有openJDK,要开发android还是需要去官网下载JDK(1.6以上).当前系统JDK版本可以通过java -version指令来查看. 到oracle官网http://www.oracle.com/technetwork/java/javase/downloads/index.html下载最新的JAVA SE开发环境(JDK),我这里下载的是jdk-8u11-linux-x64

ubuntu下进行android的开发(一):远程开发环境搭建

ubuntu系统的安装不再记录,已经有了太多的介绍.下面主要记录一些安装后环境的搭建以及一些问题的解决办法. 1.git工具的安装 因为要使用git工具来管理源码,所以安装系统后首先要安装git工具.打开终端执行下面的命令即可. sudo apt-get install qgit 2.使用ssh远程登录服务器进行开发 登录指令:ssh [-x] [email protected]_address(eg:192.18.0.12)   -------这里-X表示支持图形界面,gedit打开和另存都在

ununtu 下配置java web开发环境

body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI",Tahoma,Helvetica,Sans-Serif,"Microsoft YaHei", Georgia,Helvetica,Arial,sans-serif,宋体, PMingLiU,serif; font-size: 10.5pt; line-height: 1.5;}