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



相关文章
|
3月前
|
安全 Java API
JDK 11中的动态类文件常量:探索Java字节码的灵活性与动态性
在JDK 11中,Java语言引入了一个新的特性,允许在运行时动态地修改类文件常量。这一特性为Java开发者提供了更大的灵活性,使他们能够根据需要在运行时更改类文件中的常量值。本文将深入探讨动态类文件常量的工作原理、优点、限制以及在实际项目中的应用。
50 11
|
7月前
|
Java
解决java.lang.IllegalStateException: Failed to load ApplicationContext错误~
解决java.lang.IllegalStateException: Failed to load ApplicationContext错误~
|
5天前
|
存储 安全 Java
深入理解Java字节码与反编译技术
深入理解Java字节码与反编译技术
13 0
|
13天前
|
Java 测试技术 Maven
Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
|
1月前
|
Java 开发工具 计算机视觉
Caused by: java.lang.UnsatisfiedLinkError: Can‘t load AMD 64-bit .dll on a IA 32-bit platform【已解决】
Caused by: java.lang.UnsatisfiedLinkError: Can‘t load AMD 64-bit .dll on a IA 32-bit platform【已解决】
6 0
|
2月前
|
缓存 Java 计算机视觉
深入理解Java自动装箱和自动拆箱(反编译字节码理解每条指令)
在Java中,自动装箱(Autoboxing)是指将基本数据类型(如int、char等)自动转换为其对应的包装类(如Integer、Character等)的过程。而自动拆箱(Unboxing)则是将包装类的对象转换回其对应的基本数据类型的操作。这些特性从Java SE 5开始被引入,以方便开发者在处理基本类型和其包装类之间进行转换。 下面是一个简短的摘要: - **自动装箱**:当基本类型赋值给包装类时,例如 `Integer i = 1;`,Java会自动调用Integer的`valueOf()`方法,将int转换为Integer对象。对于数值在-128到127之间的int,会使用Int
47 2
深入理解Java自动装箱和自动拆箱(反编译字节码理解每条指令)
|
2月前
|
存储 Java 索引
《深入浅出Java虚拟机 — JVM原理与实战》带你攻克技术盲区,夯实底层基础 —— 吃透class字节码文件技术基底和实现原理(核心结构剖析)
《深入浅出Java虚拟机 — JVM原理与实战》带你攻克技术盲区,夯实底层基础 —— 吃透class字节码文件技术基底和实现原理(核心结构剖析)
34 0
|
6月前
|
安全 算法 Java
从零开发基于ASM字节码的Java代码混淆插件XHood
因在公司负责基础框架的开发设计,所以针对框架源代码的保护工作比较重视,之前也加入了一系列保护措施,例如自定义classloader加密保护,授权license保护等,但都是防君子不防小人,安全等级还比较低,经过调研各类加密混淆措施后,决定自研混淆插件,自主可控,能够贴合实际情况进行定制化,达到框架升级后使用零感知,零影响
74 1
从零开发基于ASM字节码的Java代码混淆插件XHood
|
7月前
|
存储 Java BI
如何使用 Java 程序通过 SAP Java Connector 调用 ABAP 系统的函数试读版
如何使用 Java 程序通过 SAP Java Connector 调用 ABAP 系统的函数试读版
52 0
|
3月前
|
缓存 监控 Java
Javaassist:编写字节码,改变Java的命运
Javaassist:编写字节码,改变Java的命运
33 0

热门文章

最新文章