Skip to content

Commit 49a0b23

Browse files
committed
System.exit stub
1 parent f77df8a commit 49a0b23

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

java_runtime/src/classes/java/lang/system.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ impl System {
4747
Self::set_property,
4848
MethodAccessFlags::STATIC,
4949
),
50+
JavaMethodProto::new("exit", "(I)V", Self::exit, MethodAccessFlags::STATIC),
5051
],
5152
fields: vec![
5253
JavaFieldProto::new("out", "Ljava/io/PrintStream;", FieldAccessFlags::STATIC),
@@ -158,6 +159,12 @@ impl System {
158159
Ok(value)
159160
}
160161

162+
async fn exit(_jvm: &Jvm, _: &mut RuntimeContext, status: i32) -> Result<()> {
163+
tracing::warn!("stub java.lang.System::exit({status})");
164+
165+
Ok(())
166+
}
167+
161168
pub async fn get_charset(jvm: &Jvm) -> Result<RustString> {
162169
let charset: ClassInstanceRef<Self> = jvm
163170
.invoke_static(

0 commit comments

Comments
 (0)