How to Convert a Class File to a Java File?
What is a programming language?
Before introducing compilation and decompilation, let's briefly introduce the Programming Language. Programming languages are divided into low-level languages and high-level languages.
Machine language and assembly language are low-level languages, and programs are written directly with computer instructions.
C, C ++, Java, and Python are high-level languages. Programs are written in statements, which are abstract representations of computer instructions.
What is compilation?
There are two languages mentioned above, a low-level language and a high-level language. Simple understanding: low-level languages are languages recognized by computers, and high-level languages are languages recognized by programmers.
So how do you switch from a high-level language to a low-level language? This process is actually compiling.
The process of translating source code programs written in high-level computer languages that are easy to write, read, and maintain into low-level machine language programs that can be interpreted and run by computers is compilation. The tool responsible for this process is called a compiler
Now we know what a compiler is and what a compiler is. Different languages have their own compilers. The compiler responsible for compiling in Java is a command: javac
After we write a HelloWorld.java file, we can use the javac HelloWorld.java command to generate a HelloWorld.class file. This class file is a file recognized by the JVM. Usually we think of this process as the compilation of the Java language. In fact, the class file is still not a language that the machine can recognize, because the machine can only recognize the machine language, and the JVM needs to convert this class file type bytecode into a machine language that the machine can recognize.
javac is a Java language compiler included in the JDK. The tool can compile source files with the extension .java into bytecodes with the extension .class that can run in the Java virtual machine.
What is decompilation?
The process of decompiling is just the opposite of compiling, that is, restoring the compiled programming language to an uncompiled state, that is, finding the source code of the programming language. Is to translate the language that the machine understands into a language that the programmer can understand. Decompilation in the Java language generally refers to converting a class file into a java file.
With decompilation tools, we can do many things. The main function is that with decompilation tools, we can understand the bytecode generated by the Java compiler. For example, we can gain insight into the principles behind Java's syntactic sugar.
Java commonly used decompilation tools
This article mainly introduces 4 Java decompilation tools: javap, jad and cfr, and visual decompilation tool JD-GUI.Or you can use online tool wesite - Java Decompiler Online.
What is Java Decompiler Online?
Java Decompiler Online is an online tool for decompiling class files to java source files which supports .class, .jar, .zip and other file formats. It's the best online tool to decompile java code quickly and intelligently.
3 Steps to Decompiler Java Class File
Step 1: Choose Java Class File
Drag the specified java class file to the upper area or click the above button to select the file, enter the verification code and confirm to upload the file.
Step 2: Waiting for Decompilation
Java class file will be decompiled after the file is uploaded. Please wait patiently if the file is too large.
Step 3: Download The Decompiled Java Source Code File
Open the file in the corresponding folder, and click the download button in the upper right corner to download.
By the way, please contact us if you have any question. Don't miss to share on facebook etc.
转载,请保留原文地址,谢谢 ~
How to Convert a Class File to a Java File?的更多相关文章
- Java File 类的使用方法详解
Java File类的功能非常强大,利用Java基本上可以对文件进行所有的操作.本文将对Java File文件操作类进行详细地分析,并将File类中的常用方法进行简单介绍,有需要的Java开发者可以看 ...
- Java File 类的使用方法详解(转)
转自:http://www.codeceo.com/article/java-file-class.html Java File类的功能非常强大,利用Java基本上可以对文件进行所有的操作.本文将对J ...
- Java——File类成员方法
body, table{font-family: 微软雅黑} table{border-collapse: collapse; border: solid gray; border-width: 2p ...
- Java File类方法使用详解
Java File类的功能非常强大,利用java基本上可以对文件进行所有操作.文本将对Java File 文件操作的类详细的分析,并将File类中的常用方法进行简单介绍. 构造函数 public cl ...
- Sound (audio file) player in java - working source code example
转载自:http://ganeshtiwaridotcomdotnp.blogspot.com/2011/12/sound-audio-file-player-in-java-working.html ...
- IO:File类(java.io.File)
public class File extends Object implements Serializable, Comparable<File> 构造方法: public File(S ...
- 转:Java.file
类 java.io.File 的使用 使用 File 的软件包 java.awt 包含用于创建用户界面和绘制图形图像的所有类. java.io 通过数据流.序列化和文件系统提供系统输入和输出. jav ...
- java file类的常用方法和属性
1 常用方法 a.createNewFile方法 public boolean createNewFile() throws IOException 该方法的作用是创建指定的文件.该方法只 ...
- Java File创建新目录和文件
创建目录 当不存在目录aa文件夹时: File file1=new File("/aa"); Boolean aa=file.mkdir();// true File file1= ...
随机推荐
- linux下挂载硬盘出错的解决方法
我的电脑是 Uuntu16.04 + win10 双系统,今天在Ubuntu中打开D盘时报错 Error mounting /dev/sda5 原因是D盘的格式是ntfs,在linux中会出现不识别的 ...
- mongodb学习(二)——基本的数据操作
数据操作(重点) 数据库的核心--CRUD,增加和删除较为简单,查询和修改较复杂 查询 关系运算符 $gt 大于 $lt 小于 $gte 大于等于 $lte 小于等于 $eq | (key: valu ...
- python之对象回收机制
python中,当程序执行完毕之后,python的垃圾回收机制就会将所有对象回收,清除占用的内存 请看如下代码 class Parent(): def __init__(self,name): sel ...
- Java 用集合实现简单的斗地主发牌
创建数组.集合,存放数据 public class FightAgainstLandlords { /** * poker集合,存储54张牌 */ private ArrayList<Strin ...
- await Task.Yield(); 超简单理解!
上面的代码类似于: Task.Run(() => { }).ContinueWith(t => Do(LoadData())); 意思就是: loadData 如果耗时较长那么上述代码会产 ...
- L1-006 连续因子 (20分)
题意分析 题目中已经将意思说的很清楚了,就是输出一个数的最长连续因子的个数,并且输出是哪几个因子相乘.可以将题目从这两个角度进行分析: N为素数时,最长连续因子的个数为1,即它自己. N不为素数时,即 ...
- nacos-docker安装nacos并配置数据库
拉取nacos/nacos-server镜像 docker pull nacos/nacos-server 配置数据库(MySQL) 创建存储nacos配置的数据库 create database n ...
- python中常⽤的excel模块库
python中常用的excel模块库&安装方法 openpyxl openpyxl是⼀个Python库,用于读取/写⼊Excel 2010 xlsx / xlsm / xltx / xltm⽂ ...
- 「扫盲」Elasticsearch
前言 只有光头才能变强. 文本已收录至我的GitHub精选文章,欢迎Star:https://github.com/ZhongFuCheng3y/3y 不知道大家的公司用Elasticsearch多不 ...
- python 线程池实用总结
线程池的两张方法 submit 和map from concurrent.futures import ThreadPoolExecutor import time # def sayhello(a) ...