In my Main class, i just want to store the args passed in the main method.
If i log the list in the console right after i set it it prints the argument so it's actually stored.
public class Main {
public static List<String> arguments = new ArrayList<>();
@DontObfuscate
public static void main(String[] args) throws ClassNotFoundException, InvocationTargetException, NoSuchMethodException, IllegalAccessException {
arguments = Arrays.stream(args).toList();
System.out.println(arguments);
...```
But if I log it in another class 5 seconds later it is an empty list. why?