Rename unzip tool.
[SquirrelJME.git] / modules / tac / src / test / java / ProxyMain.java
blob1c7ef276acc7fd084fcf3d307d51abd8cc4980f7
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // Multi-Phasic Applications: SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 import cc.squirreljme.jvm.mle.ReflectionShelf;
11 import cc.squirreljme.jvm.mle.ThreadShelf;
12 import cc.squirreljme.jvm.mle.TypeShelf;
14 /**
15 * Proxy main class for testing.
17 * @since 2022/09/07
19 public class ProxyMain
21 /** Was this called? */
22 public static volatile boolean called;
24 /**
25 * Main proxy entry point.
27 * @param __args Main arguments.
28 * @since 2022/09/07
30 public static void main(String... __args)
31 throws Throwable
33 // Set called
34 synchronized (ProxyMain.class)
36 ProxyMain.called = true;
39 // Copy over
40 String mainClass = __args[0];
41 String[] mainArgs = new String[__args.length - 1];
42 System.arraycopy(__args, 1,
43 mainArgs, 0, __args.length - 1);
45 // Use shelf call to main
46 ReflectionShelf.invokeMain(
47 TypeShelf.findType(mainClass.replace('.', '/')),
48 mainArgs);