posts - 33, comments - 46, trackbacks - 0, articles - 2

2012年3月7日

Linux birt3.7环境中,部分导出pdf的汉字不能正确显示,解决办法:

打开org.eclipse.birt.report.engine.fonts_2.3.2.r232_20090202.jar文件,修改fontsConfig_pdf.xml文件中下面行
<font font-family="STSong-Light" catalog="Chinese" />
<composite-font name="all-fonts">
        
<font font-family="Times-Roman" catalog="Western" />
        
<font font-family="STSong-Light" catalog="Chinese" />
        
<font font-family="HeiseiKakuGo-W5" catalog="Japanese" />
        
<font font-family="HYGoThic-Medium" catalog="Korean" />
    
</composite-font>


posted @ 2013-10-21 12:53 在路上... 阅读(1671) | 评论 (0)编辑 收藏

1、下载
wget http://mirror.bit.edu.cn/apache/subversion/subversion-1.8.3.tar.gz
2、下载依赖包
./get-deps.sh

3.install apr
./configur
make
make install
4.install apr-util
./configure --with-apr=/usr/local/apr
make
make install
5.update sqlite
sqlite-amalgamation下载安装最新版本sqlite,解压
4.yum install glibc gcc expat expat-devel openssl openssl-devel
下载有关依赖包
5.compile svn
./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-zlib \
--with-openssl --enable-maintainer-mode --with-serf=/usr/local/serf --enable-mod-activation

可能错误现象:
/tools/svn/bin/svn: symbol lookup error: /tools/svn/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr

错误解决
新配置的服务器,在运行svn命令时,全部出错显示上面的错误信息。
在网上搜索发现,原来这个错误是由于系统已经安装了apr的库文件,而在编译Svn时已经指定了httpd的apr库。
在执svn命令时,优先从系统自带的apr库载入,而引起不必要的错误。

只需要执行以下命令,将apr和apr-util都卸载即可

rpm -e --allmatches apr-util --nodeps
rpm -e --allmatches apr --nodeps


posted @ 2013-09-11 20:35 在路上... 阅读(1772) | 评论 (0)编辑 收藏

1、打包文件命名规则
根据JavaEE规范,打包的EAR文件可以不适用部署描述符部署,因此需要使用一些默认的约定规则,例如
•EJBs and client archives are packaged as .jar files.

•Web applications are packaged as .war files.

•Resource adapters are packaged as .rar files.

•Enterprise applications are packaged as .ear files, and can contain other Java EE modules such as EJBs, JDBC, JMS, Web applications, and Resource Adapters.

•Web Services can be packaged either as .war files or as .jar files, depending on whether they are implemented using Java classes or EJBs. Typically, the .war or .jar files are then packaged in an Enterprise Application .ear file.

•Java EE libraries are packaged either as an Enterprise Application (.ear file) or as a standard Java EE module.

•Client applications and optional packages are packaged as .jar files.
2、Java EE默认部署规则
通常EAR应用也可以使用开放式目录部署,此时也应该参考以上的规范配置相应的文件夹,例如
war应用目录名必须为XX.war
EAR==>xx.ear 
RAR==>XX.rar
EJB==>xx.jar

3、Java EE标准的部署规则
a. 应用包中所有扩展名是.war 的文件被看作是 web 模块。Web 模块的上下文根
的名字是相对于应用包根的名字,但要去掉.war 扩展名。
b. 应用包中所有扩展名是.rar 的文件都被看作是资源适配器。
c. 名字为 lib 的目录被看作是库目录,正如在节 8.2.1“捆绑的库”中所述。
d. 对于应用包中所有以扩展名是.jar 但不包含在 lib 目录内的文件来说,按下面 的方式来处理:
i. 如果 JAR 文件中包含带有 Main‐Class 属性的 META‐INF/MANINFEST.MF 文件, 或者包含 META‐INF/application‐client.xml 文件,那么这个 JAR 文件被看作 是应用客户端模块。
ii. 如果 JAR 文件包含 META‐INF/ejb‐jar.xml 文件,或者包含任何带有 EJB 组件 注释符(Stateless,等等)的类,那么这个 JAR 文件被看作是 EJB 模块。
iii. 所有其他的 JAR 文件都被忽略,除非它被上面的 JAR 文件使用 JAR 文件引 用机制(如在 mainfest 文件中的 Class‐Path 头library-directory)引用。

在Jboss环境中,可以在application.xml中手工指定library-directory,例如:
<library-directory>APP-INF/lib</library-directory>
其他的jboss遵循标准规范

4、Weblogic的部署规则

对于weblogic使用下面的一些规则处理目录结构:

•For an exploded archived Web application, in the absence of WEB-INF/web.xml descriptor, the name of the directory should have a .war suffix.

•For an exploded archived Enterprise Application without a META-INF/application.xml descriptor, the directory should have an .ear suffix. Within the application, the directory of exploded Web module should have a .war suffix. Similarly, the exploded EJB module should have a .jar suffix and the exploded RAR module should have a .rar suffix.

•If an exploded Enterprise Application contains no META-INF/application.xml descriptor, the order in which modules are deployed is undefined and is dependent on the underlying File.listFiles() method order. To ensure a specific order in which modules are deployed, you must add an application.xml descriptor and list the modules in the desired order.

如果在weblogic下面如果不使用上面的规则,则需要在application.xml 文件中指定对应的uri路径
或者在应用模块中使用下面的manifest路径规则

4.1 classloader的路径引用
在weblogic中EAR里面的所有应用共有一个classloader,所以对于ear里面的war,通常不需要在WEB-INF里面包含lib,weblogic提供了一个默认的目录:
APP-INF\lib:存放jar包
APP-INF\classes:存放classes

注意对于其他的应用服务器,可能没有这样的规则

5、Manifest Class-Path规则
在java EE规范中,可以使用manifest文件指定当前的应用模块对与其他classpath路径的关联引用,该文件位于
META-INF/MANIFEST.MF
路径下面,内容例如下面,多个引用路径使用空格分隔:
Manifest-Version: 1.0
Class-Path: utility.jar ../xxx/classes ../xxxlib/xxx.jar

META-INF/MANIFEST.MF



Manifest Class-Path


 

参考页面: http://docs.oracle.com/cd/E12839_01/web.1111/e13706/classloading.htm http://docs.oracle.com/cd/E12839_01/web.1111/e13702/deployunits.htm#DEPGD142

posted @ 2013-04-08 16:18 在路上... 阅读(3407) | 评论 (0)编辑 收藏

1、安装编译器   

Objective-C的编译器有很多,其中LLVM属于从GCC发展出来的,主要使用在苹果的平台中,GNU可以使用GnuStep,网址是http://wwwmain.gnustep.org/,从这里可以下载Windows版本的gcc编译器,配合codeblocks可以编译调试object c程序。
   
进入下载页面,下载上面3个软件包,安装,例如安装到D:\GNUstep,

2、安装CodeBlocks IDE环境

下载地址:http://www.codeblocks.org/

3、配置编译器

安装好codeblocks之后,进入Settings->Compiler and debugger...,选择GNU GCC Compiler编译器,复制重新命名为“GNUstep MinGW Compiler“配置

  

编译其他选项录入:-fconstant-string-class=NSConstantString -std=c99

image

同时指定搜索目录:
》编译器的搜索目录是D:\GNUstep\GNUstep\System\Library\Headers
》linker的搜索目录设置为D:\GNUstep\GNUstep\System\Library\Libraries,同时设置linker的参数:-lobjc -lgnustep-base
或者可以在linker选项中加入D:\GNUstep\GNUstep\System\Library\Libraries下面的2个文件libgnustep-base.dll.a,libobjc.dll.a

image

image

设置编译器、连接器的搜索目录

image

4、配置语法、文件类型,关键字等

添加文件类型支持

1) 进入Settings->Environment...

2) 选择 Files extension handling 添加*.m

3) 进入 Project->Project tree->Edit file types & categories...

4) 在Sources, 下面添加 *.m到文件类型列表中.

image

添加语法高亮支持

1) 进入 Settings->Editor...

2) 选择 Syntax highlighting 进入Filemasks.... 添加*.m 到文件类型列表中.

3) 进入 Keywords... (紧靠Filemasks...) 添加下面的关键字到列表中
@interface @implementation @end @class @selector @protocol @public @protected @private id BOOL YES NO SEL nil NULL self

语法高亮中,加入*.m扩展名
image 

5、代码测试

新建一个工程,修改main.c为main.m,录入下面代码

#import <Foundation/Foundation.h>

int main (int argc, const char *argv[])
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    NSLog(@"%@",@"hello world");
    [pool drain];
    return 0;
}

编译运行效果如下:

2012-03-07 17:33:49.711 objc1[6080] hello world

Process returned 0 (0x0)   execution time : 0.220 s
Press any key to continue.

posted @ 2012-03-07 17:40 在路上... 阅读(7121) | 评论 (5)编辑 收藏