但是怎么生成的jar文件不能用javaw来运行呢,还有我怎么知道是不是已经加密了呢

解决方案 »

  1.   

    请大哥指教,一定给分,我用jbuilder就会生成jar文件,我一共大概有20多个文件,我怎么全部加密生成jar文件呢,请大哥指教:)
      

  2.   

    来了.
    编辑一下你的config.txt 文件
    运行一边 java Jade -sample:config.txt
    会生成一个config配置的sample文件.#JADE project configuration file.
    #Generated by JADE Version 1.0 Alpha
    #TDC, Sun Microsystems (China) Co., Ltd.
    #2001-12-26 6:06:47guiStyle=false    #@false: Command line;  @true: GUI#Set Log File that is used to store output message for GUI style.
    guiLogFile=null    #file name. @null: no log file.#Whether update all parameters of session to this file.
    saveProject=true#A directory where the product lies.
    #If @null, treat the 1st class root directory as product root.
    productRootDirectory=E:\\workspace2\\source\
    #A file name that contains some data of obfuscation table in a concerned format.
    obfuscationTableFile=null    #@null: auto matically generate obfuscation table.#Set product type. if false, product is a standalone application.
    isApplet=false######main classes of product
    {mainClasses
    #Each line specify a class name.
    #Every class of a product especialy that not explicitly invoked by others 
    #can be treated as main class.
    #It can be format as java/lang/Object, java.lang.Object or absolute file path. com\oval\foundation\view\Dispatcher.class
    com\oval\foundation\view\Initializer.class
    com\oval\foundation\view\updateConfig.class
    com\oval\foundation\engine\OvalSearchAPI.class
    com\oval\foundation\engine\OvalDeleteAPI.class
    com\oval\foundation\engine\OvalSaveAPI.class
    com\oval\foundation\engine\OvalPageRuleAPI.class
    com\oval\foundation\engine\SequenceParseEngine.class
    com\oval\foundation\view\taglib\checkPageFlowTag.class
    } #endof main classes.#Operation of session.
    #Set all operation of a session.
    {operation
    obfuscate=true    #@false: no obfuscation; @true: do obfuscation
    encrypt=false    #@false: do not hide or encrypt key classes of the product.
    encapsulate=false    #@false: do not encapsulate the product.
    } #endof operation setting######obfuscation parameters.
    #only effictive when operation.obfuscate = true .
    {obfuscate
    #Auto obfuscate classes or not, 
    #if @true, discard all obfuscation table defined by user.
    auto=true #Fullly or fast obfuscate.
    full=true    #@true: Fully obfuscate; @false: Fast obfuscate #Obfuscate package name or not. (true/false)
    doPackageName=false #Obfuscate class name or not. (true/false)
    doClassName=false #Obfuscate other name (except package name and class name) or not.
    doOtherName=true #Set naming space for a obfuscation value of a reference name.
    #If null, will be set with default string "0123456789"
    nameSpace="0123456789" #Set name prefix for an auto-generated obfuscation value of a reference name.
    #If null, will be set as "l"
    namePrefix="l"
    } #endof obfuscation setting.######encryption key classes.
    #effictive only when operation.encrypt = true .
    {encrypt
    #Hide and cipher or only hide key classes.
    #If advanced = false, other setting in this section is ineffictive.
    advanced=true    #@false: only hide key classes. password=null    #null: auto-generate one for ciphering #A main class of product.
    mainClass=null #Result class name for this encryption.
    targetClass=null #Sepcify key classes by name.
    {className
    #Each line specify a key class name to be encrypted.
    #It can be format as java/lang/Object and java.lang.Object }
    } #endof setting of encryption key classes.#######make product encapsulation.
    #effictive only when operation.encapsulate = true .
    {encapsulate
    #Hide and cipher or only hide product.
    #If advanced = false, other setting in this section is ineffictive.
    advanced=true    #@false: only hide product. password=null    #null: auto-generate one for ciphering #Result class name for this encapsualtion.
    targetClass=rake
    } #endof seeting for product encapsulation.######output of session.
    {output
    #Set output directory of result. if null, output result to jadeout directory at PWD.
    outputDir=E:\\OvalNew\\Devel\\lib\
    #Save obfuscation table to a file or not. Default value is false.
    saveObfuscationTable=true
    outputTableFile=out.txt #Output all files or only output classes referred.Default value is true
    outputAll=true #Output result as a jar file or not.
    jar=true #jar file name effictive only if output result as a jar file.
    jarName=OvalFoundation.jar
    } #ENDOF output parameter.######protection package and common names.
    {protection
    {packagePrefix
    #Add package prefix to protect. such as:
    #java, javax, sun, sunw, com.sun and etc. java
    javax
    sunw
    com.sun
    sun
    org
    }
    {commonName
    #A reference name that should not be obfuscated:
    #main, <init> and <clinit> are always protected. SequenceParseEngine
    main
    saveData
    <clinit>
    getColType
    format
    evaluate
    getSearchResults
    SUCCESS_FLAG
    getSearchableList
    getPageFormat
    getDescPrimarys
    m_tables
    processJob
    <init>
    getNewId
    step
    getPageName
    setPageName
    deleteData
    getColDesc
    getTransaction
    getColumnNames
    }
    } #endof protection.
    给分啊!
      

  3.   

    然后用java Jade -cf:config.txt