Java的字节码和ABAP load的比较

简介: Java的字节码和ABAP load的比较

I use this small blog to help my new colleagues on board who have Java programming background to understand the hello world example written in ABAP.


Hello World example in Java

The following example could be done in pure text editor without Java IDE. You should have JDK installed as prerequisite and corresponding environment variable setup correctly.


Once done, type javac -version in command line, you should see the following output: ( result may vary based on your JDK version )image.pngimage.pngimage.pngimage.pngByte Code in ABAP – ABAP Load

The following texts are copied from ABAP help:


Result of generating an ABAP program using ABAP Compiler. The statements in the byte code are associated with C functions. When the ABAP program is executed, the byte code is loaded into the PXA as the program load and interpreted by the ABAP runtime environment (virtual machine), which accesses the associated C functions.image.png(2) Execute report RSDEPEND to analyze the dependency of report ZHELLOWORLD. ( You can find some examples how to use this report RSDEPEND from blog Use report RSDEPEND to analyze ABAP load dependencies )


The result shows that ZHELLOWORLD has dependency on ZTOOL. The timestamp of ZHELLOWORLD is larger than ZTOOL since it is activated later than ZHELLOWORLD.

image.pngimage.pngimage.pngimage.pngFurther reading

I have written a series of blogs which compare the language feature among ABAP, JavaScript and Java. You can find a list of them below:


Lazy Loading, Singleton and Bridge design pattern in JavaScript and in ABAP

Functional programming – Simulate Curry in ABAP

Functional Programming – Try Reduce in JavaScript and in ABAP

Simulate Mockito in ABAP

A simulation of Java Spring dependency injection annotation @Inject in ABAP

Singleton bypass – ABAP and Java

Weak reference in ABAP and Java

Fibonacci Sequence in ES5, ES6 and ABAP

Java byte code and ABAP Load

How to write a correct program rejected by compiler: Exception handling in Java and in ABAP

An small example to learn Garbage collection in Java and in ABAP

String Template in ABAP, ES6, Angular and React

Try to access static private attribute via ABAP RTTI and Java Reflection

Local class in ABAP, Java and JavaScript

Integer in ABAP, Java and JavaScript

Covariance in Java and simulation in ABAP

Various Proxy Design Pattern implementation variants in Java and ABAP

Tag(Marker) Interface in ABAP and Java

Bitwise operation ( OR, AND, XOR ) on ABAP Integer

ABAP ICF handler and Java Servlet

ADBC and JDBC

CL_ABAP_CORRESPONDING, CL_JAVA_CORRESPONDING and CL_JS_CORRESPONDING

Build an Cross Site Scripting example in Java and ABAP

Play around with JSONP in nodeJS server and ABAP server



相关文章
|
7天前
|
Java 数据格式 索引
使用 Java 字节码工具检查类文件完整性的原理是什么
Java字节码工具通过解析和分析类文件的字节码,检查其结构和内容是否符合Java虚拟机规范,确保类文件的完整性和合法性,防止恶意代码或损坏的类文件影响程序运行。
|
7天前
|
Java API Maven
如何使用 Java 字节码工具检查类文件的完整性
本文介绍如何利用Java字节码工具来检测类文件的完整性和有效性,确保类文件未被篡改或损坏,适用于开发和维护阶段的代码质量控制。
|
24天前
|
Java
如何从Java字节码角度分析问题|8月更文挑战
如何从Java字节码角度分析问题|8月更文挑战
|
2月前
|
Arthas Java 测试技术
Java字节码文件、组成,jclasslib插件、阿里arthas工具,Java注解
Java字节码文件、组成、详解、分析;常用工具,jclasslib插件、阿里arthas工具;如何定位线上问题;Java注解
Java字节码文件、组成,jclasslib插件、阿里arthas工具,Java注解
|
2月前
|
Java API 开发者
【Java字节码操控新篇章】JDK 22类文件API预览:解锁Java底层的无限可能!
【9月更文挑战第6天】JDK 22的类文件API为Java开发者们打开了一扇通往Java底层世界的大门。通过这个API,我们可以更加深入地理解Java程序的工作原理,实现更加灵活和强大的功能。虽然目前它还处于预览版阶段,但我们已经可以预见其在未来Java开发中的重要地位。让我们共同期待Java字节码操控新篇章的到来!
|
6月前
|
设计模式 Java 程序员
【设计模式】JAVA Design Patterns——Bytecode(字节码模式)
【设计模式】JAVA Design Patterns——Bytecode(字节码模式)
|
2月前
|
Java API 开发者
【Java字节码的掌控者】JDK 22类文件API:解锁Java深层次的奥秘,赋能开发者无限可能!
【9月更文挑战第8天】JDK 22类文件API的引入,为Java开发者们打开了一扇通往Java字节码操控新世界的大门。通过这个API,我们可以更加深入地理解Java程序的底层行为,实现更加高效、可靠和创新的Java应用。虽然目前它还处于预览版阶段,但我们已经可以预见其在未来Java开发中的重要地位。让我们共同期待Java字节码操控新篇章的到来,并积极探索类文件API带来的无限可能!
|
3月前
|
监控 Java API
分布式链路监控系统问题之对Java应用实现字节码增强的方式的问题如何解决
分布式链路监控系统问题之对Java应用实现字节码增强的方式的问题如何解决
|
3月前
|
Oracle Java 关系型数据库
简单记录在Linux上安装JDK环境的步骤,以及解决运行Java程序时出现Error Could not find or load main class XXX问题
本文记录了在Linux系统上安装JDK环境的步骤,并提供了解决运行Java程序时出现的"Error Could not find or load main class XXX"问题的方案,主要是通过重新配置和刷新JDK环境变量来解决。
120 0
|
4月前
|
存储 Java
JAVA程序运行问题之编译生成的字节码在不同的平台上是否相同如何解决
JAVA程序运行问题之编译生成的字节码在不同的平台上是否相同如何解决