亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

How to Convert a Class File to a Java File?

標簽:
Java

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.

點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消