0

I know there is a similar tread at Process 'command 'C:/Program Files/Java/jdk-14.0.1/bin/java.exe'' finished with non-zero exit value 1 in Intellij IDE

but this has a slightly different circumstance. Here is my build.Gradle

plugins {
    id'java'
    id 'application'
    id'com.github.johnrengelman.shadow' version '5.2.0'
}

mainClassName = 'me.bluedragonplayz2.dragonassistance.Bot'

version '1.0'

sourceCompatibility = JavaVersion.VERSION_14

apply plugin: 'java'

jar {
    manifest {
        attributes 'Main-Class': 'Bot'
    }
}
repositories {
    jcenter()
}



dependencies {
    implementation 'com.sedmelluq:lavaplayer:1.3.50'
    implementation group: 'net.dv8tion', name: 'JDA', version: '4.2.0_204'
    implementation group: 'com.jagrosh', name: 'jda-utilities', version: '3.0.4'
    implementation group: 'me.duncte123', name: 'botCommons', version: '1.0.88'
    implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
    implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.32.3.2'
    implementation group: 'org.menudocs', name: 'paste-client-java', version: '1.1.1'
    implementation 'io.github.cdimascio:java-dotenv:5.2.2'
    implementation group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '8.4.1.jre14'

}


compileJava.options.encoding = 'UTF-8'

also my main class (don't bother trying to find the token I use a configuration file)

    static void bot() throws LoginException, UnknownHostException {
        EnumSet<GatewayIntent> intents = EnumSet.of(
                GatewayIntent.GUILD_MESSAGES,
                GatewayIntent.GUILD_BANS,
                GatewayIntent.GUILD_EMOJIS,
                GatewayIntent.GUILD_INVITES,
                GatewayIntent.GUILD_MEMBERS,
                GatewayIntent.GUILD_VOICE_STATES
        );
        CommandClientBuilder builder = new CommandClientBuilder();
        builder.setActivity(Activity.watching("How to kill treble"))
                .setOwnerId(Config.get("owner_id"))
                .setPrefix(Config.get("prefix"))
                .addCommand(new Ping())
                .addCommand(new Eight_ball())
                .addCommand(new kick())
                .addCommand(new Ban())
                .setHelpWord("help");
        CommandClient client = builder.build();
        String token;
        if (java.net.Inet4Address.getLocalHost().getHostAddress().equalsIgnoreCase(Config.get("IP"))) {
            token = Config.get("token");
        } else {
            token = Config.get("alt_token");
        }
        JDABuilder.create(token, intents)
                .addEventListeners(new Listerner())
                .addEventListeners(new Join())
                .addEventListeners(new Kick())
                .addEventListeners(new Sandbox())
                .addEventListeners(new Guild_join())
                .addEventListeners(new Setup())
                .addEventListeners(client)
                .build();
    }
    public static void main (String[]args) throws LoginException, UnknownHostException {
        MsSQL mssql = new MsSQL();
        mssql.MsSql();
        bot();
        Console cnsl= System.console();
        if (cnsl == null) {
            System.out.println(
                    "No console available");
            return;
        }
        String input = "start";
        while (!input.equals("stop"))
        {
            input = cnsl.readLine();
        }
        System.exit(0);

    }
}

Please help I really can't find any solution if you need more information I try to answer ASAP

  • Execution failed for task ':Bot.main()'. > Process 'command 'C:/Program Files/Java/jdk-14.0.2/bin/java.exe'' finished with non-zero exit value 1 * Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Exception is :org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':Bot.main()' caused by: org.gradle.process.internal.ExecException: Process 'command 'C:/Program Files/Java/jdk-14.0.2/bin/java.exe'' finished with non-zero exit value 1 – Bluedragonplayz2 Oct 21 '20 at 14:57
  • if you need more detailed logs pls tell me – Bluedragonplayz2 Oct 21 '20 at 14:59
  • I have the same issue! How did you solve it? – ALU Mar 13 '21 at 19:44

0 Answers0