大家好!今天让小编来大家介绍下关于l大源码编译的问题,以下是小编对此问题的归纳整理,让我们一起来看看吧。
文章目录列表:
- 1、java的class文件,经过反编译以后获得的源代码是L(小写),1,i(大写),o(大写和小写),0的组合,是怎么回事
- 2、DELPHI源码如何编译为可执行文件
- 3、如何将源代码编译成jar包
- 4、Linux内核源码如何编译
一、java的class文件,经过反编译以后获得的源代码是L(小写),1,i(大写),o(大写和小写),0的组合,是怎么回事
java的class文件,经过反编译以后获得的源代码是L(小写),1,i(大写),o(大写和小写),0的组合,是怎么回事
public class III11lll(){ public void OOoo00(String ooOO){ …… } ……}在网上查到是“混淆加密”,但是我想看到源码,该怎么办呢?如果帮着解决,会有追分的
二、DELPHI源码如何编译为可执行文件
推荐于
编译Delphi要用到 dcc32.exe,此文件位于 Delphi安装文件夹 bin里面命令行运行,说明如下:Syntax: dcc32 [options] filename [options] -A unit = alias = Set unit alias -LU package = Use package -B = Build all units -M = Make modified units -CC = Console target -N path = DCU output directory -CG = GUI target -O paths = Object directories -D syms = Define conditionals -P = look for 8.3 file names also -E path = EXE output directory -Q = Quiet compile -F offset = Find error -R paths = Resource directories -GD = Detailed map file -U paths = Unit directories -GP = Map file with publics -V = Debug information in EXE -GS = Map file with segments -VR = Generate remote debug (RSM) -H = Output hint messages -W = Output warning messages -I paths = Include directories -Z = Output never build DCPs -J = Generate .obj file -$ dir = Compiler directive -JP = Generate C++ .obj file –help = Show this help screen -K addr = Set image base addr –version = Show name and versionCompiler switches: -$ letter state (defaults are shown below) A8 Aligned record fields P+ Open string params B- Full boolean Evaluation Q- Integer overflow checking C+ Evaluate assertions at runtime R- Range checking D+ Debug information T- Typed @ operator G+ Use imported data references U- Pentium(tm)-safe divide H+ Use long strings by default V+ Strict var-strings I+ I/O checking W- Generate stack frames J- Writeable structured consts X+ Extended syntax L+ Local debug symbols Y+ Symbol reference info M- Runtime type info Z1 Minimum size of enum types O+ Optimization如果要编译一个项目有多个文件,或者包涵资源文件,一般使用图形开发环境进行编译。
三、如何将源代码编译成jar包
先打开命令提示符(win2000或在运行框里执行cmd命令,win98为DOS提示符),输入jar Chelp,然后回车(如果你盘上已经有了jdk1.1或以上版本),看到什么: 用法:jar {ctxu}[vfm0Mi] [jar-文件] [manifest-文件] [-C 目录] 文件名 … 选项: -c 创建新的存档 -t 列出存档内容的列表 -x 展开存档中的命名的(或所有的〕文件 -u 更新已存在的存档 -v 生成详细输出到标准输出上 -f 指定存档文件名 -m 包含来自标明文件的标明信息 -0 只存储方式;未用zip压缩格式 -M 不产生所有项的清单(manifest〕文件 -i 为指定的jar文件产生索引信息 -C 改变到指定的目录,并且包含下列文件: 如果一个文件名是一个目录,它将被递归处理。 清单(manifest〕文件名和存档文件名都需要被指定,按\’m\’ 和 \’f\’标志指定的相同顺序。首先在资源文件当前目录写一个清单文件example.mf mf文件应是以下格式: 第一行为: Main-Class: Hello 然后最少两个空行。 其中的Hello.class是你写的程序中main函数所在的那个类名。 有两点必须记得: 1,在第一行中\”Main-class:\”之后一定要有一个空格。后有最少两个空行 2,类名不能写成Hello.class的格式,要省了后辍。 我试过了,你错的原因是\”Main-class:\”之后没有一个空格。 在CLASS目录下运行:jar cfm example.jar example.mf A.class B.class 示例1:将两个class文件存档到一个名为 \’classes.jar\’ 的存档文件中: jar cvf classes.jar Foo.class Bar.class 示例2:用一个存在的清单(manifest)文件 \’mymanifest\’ 将 foo/ 目录下的所有文件存档到一个名为 \’classes.jar\’ 的存档文件中: jar cvfm classes.jar mymanifest -C foo/ . 来个小例子试试看: 我们只有一个HelloWorld,如下: public class HelloWorld{ public static void main(String[ ] args){ System.out.println(\”Hi, Hello World!\”); } } 将这个java文件存到C盘跟目录下,ok,接下来, 在先前打开的命令提示符下(跳转到C盘提示符下),我们输入javac HelloWorld.java,然后继续输入:jar cvf hello.jar HelloWorld.class,回车后去你的C盘看看,多了什么,没错 hello.jar 。 基本的步骤我们现在都知道了,你可以自己去尝试一下随着jar后面的参数的不同,结果有什么变化。 紧接着我们看看如何运行我们的jar包。 在进入正题之前,你要先打开我们刚刚做好的jar包看看,多了什么呢,META-INF目录?再看看里面是什么,还有一个MANIFEST.MF文件是不是?用文本编辑器(我这里是UltraEdit)打开它看看: Manifest-Version: 1.0 Created-By: 1.4.2 (Sun Microsystems Inc.) 就是这样。这里我们对它进行修改,加一句:Main-Class: HelloWorld (在第三行)。这个就是我们之前写的那个类,也就是我们的入口类。也即, Manifest-Version: 1.0 Created-By: 1.4.2 (Sun Microsystems Inc.) Main-Class: HelloWorld 接下来,我们在命令提示符里执行: jar umf MANIFEST.MF app.jar (应该是hello.jar吧) 这样我们使用了我们自己的MANIFEST.MF文件对原来默认的进行了更新。你不妨可以再进去看看是不是添上了Main-Class: HelloWorld这一句。 (是吗,我怎么没试出来,提示java.io.FileNotFoundException:MANIFEST.MF(系统找不到指定的文件)怎么回事?)Ok,这个最后的一步了,来验证我们做的一切,在命令提示符中输入: java -jar hello.jar(执行) 出现了什么, Hi, Hello World! 我们再来看看jar文件在tomcat中发布,注意:在tomcat中我们就不能再用jar这种格式,而改war格式,它是专门用于web应用的,其实整个过程下来基本上和jar是类似的: 先准备我们要打包的资源。 找到存放tomcat的webapps目录,进到其中,新建一个文件夹,这里命名为hello,再进去新建WEB-INF文件夹,再进去新建 classes文件夹,此时我们也将我们唯一的servlet,HelloWorld.java放到这里,在与classes目录同级下建立一文件 web.xml。Ok,目前我们初步建立了一个简单的web应用。 这是HelloWorld.java: import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(\”text/html\”); PrintWriter out = res.getWriter(); out.println(\”\”); out.println(\”\”); out.println(\”\”); out.println(\”Hello, World!\”); out.println(\”\”); } }//end here! 对它编译。下面是web.xml: ?xml version=\”1.0\” encoding=\”UTF-8\”? !DOCTYPE web-app PUBLIC \”-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\” \”\” web-app servlet servlet-name hello /servlet-name servlet-class HelloWorld /servlet-class /servlet servlet-mapping servlet-name hello /servlet-name url-pattern /HelloWorld /url-pattern /servlet-mapping /web-app 在命令提示符下进到先前创制的hello目录下,执行 jar cvf hello.war * ,我们便得到hello.war。将它拷贝至webapps目录下,ok,来看最后一步,打开tomcat的目录conf中的server.xml,加入: Context path=\”/hello\” docBase=\”hello.war\” debug=\”0\” reloadable=\”true\”/ 大功告成!运行它,启动tomcat,后在浏览器中输入,有了吗? 最后,如果你想用ant来完成以上的打包活动,下面就告诉你: 对于jar来说。在build.xml中, target name=\”jar\” jar destfile=\”${app_home}/hello.jar\” fileset dir=\”${dest}\” includes=\”**\”/ !–fileset dir=\”${dest}\” includes=\”**/action.properties\”/– /jar /target 对于war, war warfile=\”hello.war\” webxml=\”./WEB-INF/web.xml\” fileset dir=\”html\”/ lib dir=\”lib/\” exclude name=\”oracle*.jar\”/ /lib classes dir=\”build/servlets\” include name=\”**/*.class\”/ /classes /war 好了,就这么多,希望对你有点帮助。:) 补充: jar基本操作: 1. 创建jar文件 jar cf jar-file input-file(s) c—want to Create a JAR file. f—want the output to go to a file rather than to stdout. eg: 1)jar cf myjar.jar query_maintain_insert.htm 2)jar cvf myjar.jar query_maintain_insert.htm v—Produces verbose(详细的) output. 3)jar cvf myjar.jar query_maintain_insert.htm mydirectory 4)jar cv0f myjar.jar query_maintain_insert.htm mydirectory 0—don\’t want the JAR file to be compressed. 5)jar cmf MANIFEST.MF myjar.jar yahh.txt m—Used to include manifest information from an existing manifest file. 6)jar cMf MANIFEST.MF myjar.jar yahh.txt M—the default manifest file should not be produced. 7)jar cvf myjar.jar * *—create all contents in current directory. 2. 察看jar文件 jar tf jar-file t—want to view the Table of contents of the JAR file. eg: 1)jar vft yahh.jar v—Produces verbose(详细的) output. 3. 提取jar文件 jar xf jar-file [archived-file(s)] x—want to extract files from the JAR archive. eg: 1)jar xf yahh.jar yahh.txt(仅提取文件yahh.txt) 2)jar xf yahh.jar alex/yahhalex.txt(仅提取目录alex下的文件yahhalex.txt) 3)jar xf yahh.jar(提取该jar包中的所有文件或目录) 4. 修改Manifest文件 jar cmf manifest-addition jar-file input-file(s) m—Used to include manifest information from an existing manifest file. 5. 更新jar文件 jar uf jar-file input-file(s) u—want to update an existing JAR file
四、Linux内核源码如何编译
编译linux内核步骤:1、安装内核如果内核已经安装(/usr/src/目录有linux子目录),跳过。如果没有安装,在光驱中放入linux安装光盘,找到kernel-source-2.xx.xx.rpm文件(xx代表数字,表示内核的版本号),比如RedHatlinux的RPMS目录是/RedHat/RPMS/目录,然后使用命令rpm-ivhkernel-source-2.xx.xx.rpm安装内核。如果没有安装盘,可以去各linux厂家站点或者下载。2、清除从前编译内核时残留的.o文件和不必要的关联cd/usr/src/linuxmakemrproper3、配置内核,修改相关参数,请参考其他资料在图形界面下,makexconfig;字符界面下,makemenuconfig。在内核配置菜单中正确设置个内核选项,保存退出4、正确设置关联文件makedep5、编译内核对于大内核(比如需要SCSI支持),makebzImage对于小内核,makezImage6、编译模块makemodules7、安装模块makemodules_install8、使用新内核把/usr/src/linux/arch/i386/boot/目录内新生成的内核文件bzImage/zImage拷贝到/boot目录,然后修改/etc/lilo.conf文件,加一个启动选项,使用新内核bzImage/zImage启动。格式如下:boot=/dev/hdamap=/boot/mapinstall=/boot/boot.bprompttimeout=50lineardefault=linux-new###告诉lilo缺省使用新内核启动linux###append= mem=256M image=/boot/vmlinuz-2.2.14-5.0label=linuxread-onlyroot=/dev/hda5image=/boot/bzImage(zImage)label=linux-newread-onlyroot=/dev/hda5保留旧有的启动选项可以保证新内核不能引导的情况,还可以进入linux进行其他操作。保存退出后,不要忘记了最重要的一步,运行/sbin/lilo,使修改生效。9、重新生成ram磁盘如果您的系统中的/etc/lilo.conf没有使用了ram磁盘选项initrd,略过。如果您的系统中的/etc/lilo.conf使用了ram磁盘选项initrd,使用mkinitrdinitrd-内核版本号,内核版本号命令重新生成ram磁盘文件,例如我的Redhat6.2:mkinitrdinitrd-2.2.14-5.02.2.14-5.0之后把/etc/lilo.conf中的initrd指向新生成的initrd-2.2.14-5.0文件:initrd=/boot/initrd-2.2.14-5.0ram磁盘能使系统性能尽可能的优化,具体参考/usr/src/linux/Documents/initrd.txt文件10、重新启动,OK!
以上就是小编对于l大源码编译问题和相关问题的解答了,l大源码编译的问题希望对你有用!
常见问题FAQ
- 免费下载或者VIP会员专享资源能否直接商用?
- 免费下载或者VIP会员专享资源能否直接商用?
- 免费下载或者VIP会员专享资源能否直接商用?