So, basically, I have a JComboBox which I use to change the current language of the app. To achieve this, since I have a lot of components and I don't really want to manually change the text on all of them (buttons, ...), I think the best solution is to just restart the program with a "-language "XX"" argument (which I can easily handle on the program start-up method).
This code does the job:
public static void restartApplication(String language)
{
    String javaBin = System.getProperty("java.home") + File.separator + "bin" + File.separator +      "java";
    File currentJar = new     File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI());
    // Build command: java -jar application.jar -language "EN" 
    String command = "\"";
    command += javaBin + "\"" +
        " -jar " + "\"" + currentJar.getPath() + "\"" +
        " -language \"" + language + "\"";
    // Execute command
    new ProcessBuilder(command).start();
    // Close the current instance
    System.exit(0);
}
My problem is, well, how to make it work in an IDE (Eclipse, in this case)? Do I need to locate the program's main class (compiled by Eclipse?)?
Edit: Actually, designing it in a way that I don't have to restart my program would be better. Thanks!
 
     
    