Java program not running

Question: Why isn’t my repl running? It was running fine yesterday.

Repl link: Riff Generator

When I try to run the code, It compiles normally, but then prints out “java -classpath .:target/dependency/* Main” and sits there doing nothing. No matter how long I wait it will not not do anything. I do not have a code snippet as I don’t know which code is causing it. Maybe I need to move the class files into a folder or something?

@JosephBallin, I have not found the error yet, but I discovered the location. The error is in your NoteConverter constructor. I will tell you if I find the error and solution. And might I ask why you are using i = 12; instead of break;in your for loops?

Could you show me a picture of the error, I can’t get it to run and I would like to try to figure it out

@BananaPi, No error is actually thrown. It just doesn’t load properly. I tried commenting out multiple lines in, and found that the NoteConverter class was causing the issue.

Try to print exceptions that may occur with a try-cath. It gives more detail about what’s going wrong.

public class Main {
    public static void main(String[] args) {
        try {
            NoteConverter noteConverter = new NoteConverter();
            UserInput testinput = new UserInput();
        } catch (Exception e) {

I didn’t really need to use break; because I don’t need the loop to be terminated immediately, as long as another iteration doesn’t occur.

The error was somewhere within the loop for creating Fretboard in I decided to just delete them and try a new approach. I will update with results.

UPDATE: I fixed it, don’t know what the error was but I moved it to and tried using nested loops. It’s running again now. thanks @LegoWizardCode for pointing out where the error was.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.