Taylor Lopez
Taylor Lopez

Reputation: 23

Intellij file not found or corrupted

I have a project module that looks like this. Project Structure

This is a freshly cloned GitHub project that I've been working on. And every time I try and run the main class I get this Error.

"C:\Program Files\Java\jdk1.8.0_121\bin\java"...com.intellij.rt.execution.application.AppMain Main" (Shortened for sanity).

The message that follow this is: "File does not exist or is corrupted, exiting with Status 1. Process finished with exit code 1."

I've imported the project through the prompt for Intellij and let it build it's own .idea folder. I sincerely cannot find any article or FAQ that highlights the fix for this error. I've reinstalled the JDK and Java a few times. The project SDK is defined and it's there, so I'm not sure what to do at this point.

The full error code is:

""C:\Program Files\Java\jdk1.8.0_121\bin\java" -Didea.launcher.port=7534 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_121\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\rt.jar;C:\Users\Taylor Lopez\Documents\GitHub\MatrixProject\out\production\MatrixProject;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain Main"

Upvotes: 1

Views: 2913

Answers (1)

sargue
sargue

Reputation: 5915

The program is executing fine. I mean that there is no problem with the IDE, VM, JDK. The error that you are seeing it's indeed in your project:

try {
    MatrixWriter.loadDataStore(dataStore);
}
catch(IOException e) {
    System.out.print("File does not exist or is corrupted, exiting with Status 1");
    System.exit(1);
}

Your MatrixWriter.loadDataStore is throwing an exception, you catch it and print that message.

The problem is that you are swallowing the exception so you don't know the details of the problem.

Change your exception handler code to add this:

try {
    MatrixWriter.loadDataStore(dataStore);
}
catch(IOException e) {
    System.out.print("File does not exist or is corrupted, exiting with Status 1");
    e.printStackTrace();
    System.exit(1);
}

And run it again. You will find in the output a detailed explanation of the error.

Upvotes: 1

Related Questions