update INVOKESTATIC

This commit is contained in:
wangxiang
2023-07-27 11:43:09 +08:00
parent 12f0428d12
commit 366ad75831
3 changed files with 8 additions and 4 deletions

View File

@@ -12,7 +12,8 @@
# 实现功能 # 实现功能
* 支持基本数据类型数学运算 * 支持基本数据类型数学运算
* 支持循环、条件结构代码、switch 语法(开发中... * 支持循环、条件结构代码
* switch 语法(开发中...
* 支持创建对象,访问对象 * 支持创建对象,访问对象
* 支持多态继承、接口 * 支持多态继承、接口
* 支持反射 * 支持反射
@@ -96,6 +97,9 @@ public void test() throws Exception {
2. 编写一个 java 项目编译打包成 .jar 文件,例如 demo.jar。要求 .jar 文件中的 META-INF/MANIFEST.MF 文件内有 `Main-Class` 属性 (含有 public static void main(String[] args) 方法的主类信息) 2. 编写一个 java 项目编译打包成 .jar 文件,例如 demo.jar。要求 .jar 文件中的 META-INF/MANIFEST.MF 文件内有 `Main-Class` 属性 (含有 public static void main(String[] args) 方法的主类信息)
3. 使用 haidnorJVM 运行程序。执行命令 `java -jar haidnorJVM.jar -class R:\demo.jar`。注意需要 jar 文件的绝对路径 3. 使用 haidnorJVM 运行程序。执行命令 `java -jar haidnorJVM.jar -class R:\demo.jar`。注意需要 jar 文件的绝对路径
# 代办
目前运行 JDK 自带的类的方案是使用反射解决并存在一些bug计划将来完全不依赖反射运行。
# 联系作者 # 联系作者
![](/readme/20230721181408.png ) ![](/readme/20230721181408.png )
微信号: haidnor 微信号: haidnor

View File

@@ -89,7 +89,7 @@ public class TestJVM {
@Test @Test
public void demo_foreach() throws Exception { public void demo_foreach() throws Exception {
runMainClass(demo_foreach.class); runMainClass(demo_foreach_1.class);
} }
/** /**

View File

@@ -1,6 +1,6 @@
package haidnor.jvm.test.demo; package haidnor.jvm.test.demo;
public class demo_foreach { public class demo_foreach_1 {
public static void main(String[] args) { public static void main(String[] args) {
int[] arr = new int[]{999, 333}; int[] arr = new int[]{999, 333};
for (int i : arr) { for (int i : arr) {