<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

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

    2012年1月17日

    Linux birt3.7環(huán)境中,部分導(dǎo)出pdf的漢字不能正確顯示,解決辦法:

    打開(kāi)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 在路上... 閱讀(1770) | 評(píng)論 (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
    下載有關(guān)依賴包
    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

    可能錯(cuò)誤現(xiàn)象:
    /tools/svn/bin/svn: symbol lookup error: /tools/svn/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr

    錯(cuò)誤解決
    新配置的服務(wù)器,在運(yùn)行svn命令時(shí),全部出錯(cuò)顯示上面的錯(cuò)誤信息。
    在網(wǎng)上搜索發(fā)現(xiàn),原來(lái)這個(gè)錯(cuò)誤是由于系統(tǒng)已經(jīng)安裝了apr的庫(kù)文件,而在編譯Svn時(shí)已經(jīng)指定了httpd的apr庫(kù)。
    在執(zhí)svn命令時(shí),優(yōu)先從系統(tǒng)自帶的apr庫(kù)載入,而引起不必要的錯(cuò)誤。

    只需要執(zhí)行以下命令,將apr和apr-util都卸載即可

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


    posted @ 2013-09-11 20:35 在路上... 閱讀(1795) | 評(píng)論 (0)編輯 收藏

    1、打包文件命名規(guī)則
    根據(jù)JavaEE規(guī)范,打包的EAR文件可以不適用部署描述符部署,因此需要使用一些默認(rèn)的約定規(guī)則,例如
    •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默認(rèn)部署規(guī)則
    通常EAR應(yīng)用也可以使用開(kāi)放式目錄部署,此時(shí)也應(yīng)該參考以上的規(guī)范配置相應(yīng)的文件夾,例如
    war應(yīng)用目錄名必須為XX.war
    EAR==>xx.ear 
    RAR==>XX.rar
    EJB==>xx.jar

    3、Java EE標(biāo)準(zhǔn)的部署規(guī)則
    a. 應(yīng)用包中所有擴(kuò)展名是.war 的文件被看作是 web 模塊。Web 模塊的上下文根
    的名字是相對(duì)于應(yīng)用包根的名字,但要去掉.war 擴(kuò)展名。
    b. 應(yīng)用包中所有擴(kuò)展名是.rar 的文件都被看作是資源適配器。
    c. 名字為 lib 的目錄被看作是庫(kù)目錄,正如在節(jié) 8.2.1“捆綁的庫(kù)”中所述。
    d. 對(duì)于應(yīng)用包中所有以擴(kuò)展名是.jar 但不包含在 lib 目錄內(nèi)的文件來(lái)說(shuō),按下面 的方式來(lái)處理:
    i. 如果 JAR 文件中包含帶有 Main‐Class 屬性的 META‐INF/MANINFEST.MF 文件, 或者包含 META‐INF/application‐client.xml 文件,那么這個(gè) JAR 文件被看作 是應(yīng)用客戶端模塊。
    ii. 如果 JAR 文件包含 META‐INF/ejb‐jar.xml 文件,或者包含任何帶有 EJB 組件 注釋符(Stateless,等等)的類,那么這個(gè) JAR 文件被看作是 EJB 模塊。
    iii. 所有其他的 JAR 文件都被忽略,除非它被上面的 JAR 文件使用 JAR 文件引 用機(jī)制(如在 mainfest 文件中的 Class‐Path 頭library-directory)引用。

    在Jboss環(huán)境中,可以在application.xml中手工指定library-directory,例如:
    <library-directory>APP-INF/lib</library-directory>
    其他的jboss遵循標(biāo)準(zhǔn)規(guī)范

    4、Weblogic的部署規(guī)則

    對(duì)于weblogic使用下面的一些規(guī)則處理目錄結(jié)構(gòu):

    •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下面如果不使用上面的規(guī)則,則需要在application.xml 文件中指定對(duì)應(yīng)的uri路徑
    或者在應(yīng)用模塊中使用下面的manifest路徑規(guī)則

    4.1 classloader的路徑引用
    在weblogic中EAR里面的所有應(yīng)用共有一個(gè)classloader,所以對(duì)于ear里面的war,通常不需要在WEB-INF里面包含lib,weblogic提供了一個(gè)默認(rèn)的目錄:
    APP-INF\lib:存放jar包
    APP-INF\classes:存放classes

    注意對(duì)于其他的應(yīng)用服務(wù)器,可能沒(méi)有這樣的規(guī)則

    5、Manifest Class-Path規(guī)則
    在java EE規(guī)范中,可以使用manifest文件指定當(dāng)前的應(yīng)用模塊對(duì)與其他classpath路徑的關(guān)聯(lián)引用,該文件位于
    META-INF/MANIFEST.MF
    路徑下面,內(nèi)容例如下面,多個(gè)引用路徑使用空格分隔:
    Manifest-Version: 1.0
    Class-Path: utility.jar ../xxx/classes ../xxxlib/xxx.jar

    META-INF/MANIFEST.MF



    Manifest Class-Path


     

    參考頁(yè)面: 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 在路上... 閱讀(3455) | 評(píng)論 (0)編輯 收藏

    1、安裝編譯器   

    Objective-C的編譯器有很多,其中LLVM屬于從GCC發(fā)展出來(lái)的,主要使用在蘋(píng)果的平臺(tái)中,GNU可以使用GnuStep,網(wǎng)址是http://wwwmain.gnustep.org/,從這里可以下載Windows版本的gcc編譯器,配合codeblocks可以編譯調(diào)試object c程序。
       
    進(jìn)入下載頁(yè)面,下載上面3個(gè)軟件包,安裝,例如安裝到D:\GNUstep,

    2、安裝CodeBlocks IDE環(huán)境

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

    3、配置編譯器

    安裝好codeblocks之后,進(jìn)入Settings->Compiler and debugger...,選擇GNU GCC Compiler編譯器,復(fù)制重新命名為“GNUstep MinGW Compiler“配置

      

    編譯其他選項(xiàng)錄入:-fconstant-string-class=NSConstantString -std=c99

    image

    同時(shí)指定搜索目錄:
    》編譯器的搜索目錄是D:\GNUstep\GNUstep\System\Library\Headers
    》linker的搜索目錄設(shè)置為D:\GNUstep\GNUstep\System\Library\Libraries,同時(shí)設(shè)置linker的參數(shù):-lobjc -lgnustep-base
    或者可以在linker選項(xiàng)中加入D:\GNUstep\GNUstep\System\Library\Libraries下面的2個(gè)文件libgnustep-base.dll.a,libobjc.dll.a

    image

    image

    設(shè)置編譯器、連接器的搜索目錄

    image

    4、配置語(yǔ)法、文件類型,關(guān)鍵字等

    添加文件類型支持

    1) 進(jìn)入Settings->Environment...

    2) 選擇 Files extension handling 添加*.m

    3) 進(jìn)入 Project->Project tree->Edit file types & categories...

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

    image

    添加語(yǔ)法高亮支持

    1) 進(jìn)入 Settings->Editor...

    2) 選擇 Syntax highlighting 進(jìn)入Filemasks.... 添加*.m 到文件類型列表中.

    3) 進(jìn)入 Keywords... (緊靠Filemasks...) 添加下面的關(guān)鍵字到列表中
    @interface @implementation @end @class @selector @protocol @public @protected @private id BOOL YES NO SEL nil NULL self

    語(yǔ)法高亮中,加入*.m擴(kuò)展名
    image 

    5、代碼測(cè)試

    新建一個(gè)工程,修改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;
    }

    編譯運(yùn)行效果如下:

    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 在路上... 閱讀(7168) | 評(píng)論 (5)編輯 收藏

    在linux環(huán)境部署應(yīng)用時(shí),有時(shí)候需要用到AWT處理圖片的功能,典型的就是圖片的縮放處理等等,可能會(huì)遇到下面錯(cuò)誤:
    java.lang.NoClassDefFoundError
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:141)
      at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
      at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)

    甚至在默寫(xiě)情況下面可能導(dǎo)致jvm崩潰,對(duì)于該問(wèn)題的解決辦法是

    1、配置java啟動(dòng)參數(shù)java -Djava.awt.headless=true
    在jdk1.4及以上的環(huán)境中,允許使用沒(méi)有鍵盤(pán)、鼠標(biāo)、x window顯示啟動(dòng)的headless虛擬機(jī)模式,通過(guò)加上上面的屬性即可

    2、配置合適的DISPLAY屬性

    例如通過(guò)當(dāng)前用戶啟動(dòng)了一個(gè)x window的圖形界面,可以將設(shè)置類似export DISPLAY=localhost:10.0這樣的環(huán)境變量將awt定位到一個(gè)實(shí)際存在的環(huán)境處理。

    配置成功之后,可能可以看到這樣的提示

    nl.ikarus.nxt.priv.imageio.icoreader.lib.ICOReader loaded, version: 0.06.064 build: 691

    配置好之后就不會(huì)報(bào)錯(cuò)了

    網(wǎng)上還有一種辦法,啟動(dòng)Xvfb

    使用

    ls -l /tmp/.X*lock
    可以查看當(dāng)前啟動(dòng)了那些xwindow,如果發(fā)現(xiàn)X0,可能0.0已經(jīng)被使用了

    使用兩個(gè)命令:
       ------------------------------------
       Xvfb :1 -screen 0 800x600x16 & 啟動(dòng)Xwindows的虛擬設(shè)備
       export DISPLAY=localhost:1.0 配置本地環(huán)境
       ------------------------------------

    參考:http://javatechniques.com/blog/linux-x11-libraries-for-headless-mode/

    posted @ 2012-01-19 12:01 在路上... 閱讀(916) | 評(píng)論 (0)編輯 收藏

    安裝好的CentOS會(huì)自帶OpenJdk,用命令 java -version ,會(huì)有下面的信息:

    java version "1.6.0"
    OpenJDK  Runtime Environment (build 1.6.0-b09)
    OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)

    最好還是先卸載掉openjdk,在安裝sun公司的jdk.

    先查看 rpm -qa | grep java

    顯示如下信息:

    java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
    java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5

    卸載:

    rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
    rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5

    還有一些其他的命令

    rpm -qa | grep gcj

    rpm -qa | grep jdk

    如果出現(xiàn)找不到openjdk source的話,那么還可以這樣卸載

     yum -y remove java java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
     yum -y remove java java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5

    posted @ 2012-01-17 10:42 在路上... 閱讀(366) | 評(píng)論 (0)編輯 收藏

    主站蜘蛛池模板: 中文字幕无码免费久久9一区9| 亚洲精品123区在线观看| 又长又大又粗又硬3p免费视频| 很黄很黄的网站免费的| 亚洲特级aaaaaa毛片| 精品无码无人网站免费视频| 亚洲人成电影福利在线播放| 十九岁在线观看免费完整版电影| 亚洲AV无码码潮喷在线观看| 无码av免费一区二区三区试看| 亚洲大片在线观看| 亚洲电影免费观看| 亚洲午夜福利在线视频| 午夜免费福利在线观看| 免费人成又黄又爽的视频在线电影| 亚洲精品WWW久久久久久| 中文字幕的电影免费网站| 亚洲成A∨人片在线观看不卡| 久久免费视频99| 亚洲人成在线中文字幕| 天天拍拍天天爽免费视频 | 亚洲视频一区在线观看| 希望影院高清免费观看视频| 亚洲乱码一区二区三区国产精品| 日韩一级免费视频| 久久WWW免费人成—看片| 亚洲αv在线精品糸列| 最近中文字幕无吗免费高清 | 亚洲色偷偷综合亚洲AV伊人蜜桃| 日韩免费视频观看| 国产日韩在线视频免费播放| 亚洲黄色在线播放| 国产免费私拍一区二区三区| 中文在线免费观看| 亚洲免费在线观看视频| 亚洲黄片毛片在线观看| 久久久久久精品成人免费图片| 亚洲AV无码国产剧情| 亚洲av午夜福利精品一区| 日韩在线a视频免费播放| 国内精品99亚洲免费高清|