简体   繁体   中英

Terminated nonerror in eclipse java regarding javaw.exe

I realize that when eclipse says:

<terminated> main [java application] C:\program files\java\jre1.8.0_25\bin\javaw.exe 

That the program ran and terminated. My problem is that it doesn't really run, as soon as I hit run it immediately shows this message. The program doesn't run at all. Anyone know how to stop javaw.exe from terminating the program immediately?

public class main {
    public static void main(final String[] args) throws Exception {
        Twitchbot bot = new Twitchbot();

        bot.setVerbose(true);
        bot.connect("irc.twitch.tv", "6667", "oauth:*********************************");
        bot.joinChannel("#donnie64");
    }
}

That's because your program did run , and It did exit , all without error or output. It creates a Twitchbot , sets it to verbose, connects, joins the channel, then the program ends after that because it has no more instructions, loops, or threads to wait for. The only thing it says is

<terminated> main [java application] C:\program files\java\jre1.8.0_25\bin\javaw.exe

because that's what Eclipse is supposed to say when a program ends.

If there was an error, it should've printed something in the console in red letters like:

Exception in thread "main" java.lang.RuntimeException
    at testing.NFATest.main(NFATest.java:45)

or whatever exception it threw. ( NullPointerException , ArrayIndexOutOfBounds , etc)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM