codeRunner cannot find or load main com.backendless.coderunner.CodeRunnerLoader

Hi, I am trying to setup the coderunner for debugging, I have downloaded my coderunner from the code generation with the download button from custom events, iv followed and tried using the terminal with the command ./codeRunner.sh as shown in https://www.youtube.com/watch?v=9hEoqC44CCo but I’m getting this:

Listening for transport dt_socket at address: 5005
Error: Could not find or load main class com.backendless.coderunner.CodeRunnerLoader

In other documentation is says the coderunner takes the code runner secret key as an arg so have tried that to but same thing.

Not sure what the issue is here exactly, I have the .jar backendless library file in the lib folder and have compiled the project in intellij idea.

Hi Leonard,

What version of Java do you have installed locally?

Regards,
Mark

I believe it is 1.8, the JDK home path is jdk1.8.0_45

Did you do anything with the directory structure of the downloaded project?

Did you add any files or jars anywhere in the hierarchy?

Also, could you please copy/paste here the entire output of the command when you run it?

Have left the folder directory unchanged and have not added anything to it, only set the Module SDK to 1.8 in the dependencies

C:\Users\Leonard\Downloads\Server\bin>codeRunner.sh
Welcome to Git (version 1.9.5-preview20141217)

Run ‘git help git’ to display the help index.
Run ‘git help <command>’ to display help for specific commands.
Listening for transport dt_socket at address: 5005
Error: Could not find or load main class com.backendless.coderunner.CodeRunnerLoader

Since you are on Windows, why do you run the .sh file? Have you tried CodeRunner.bat? It is right there in the same directory.

Ahh its working now, that was my rookie error. Thanks

I followed all the steps, java version is 9.0.4.
Build goes well
When execting .\bin\CodeRunner.bat in projet directory, got the message

Starting CodeRunner
Listening for transport dt_socket at address: 5005

Erreur : impossible de trouver ou de charger la classe principale com.backendless.coderunner.CodeRunnerLoader
Causé par : java.lang.ClassNotFoundException: com.backendless.coderunner.CodeRunnerLoader
Appuyez sur une touche pour continuer…

Also tested with Java 8… same behaviour

Hi again Philippe,

Try executing the same command but from …/bin directory and get back with results)

Best regards

Done, give U the response in log.txt attached file

log.txt (12.21kB)

This does not look right. Please zip up your project and send it to support@backendless.com. We shall investigate the issue and will be working on a fix. Share a link to this support topic in email.
Thanks in advance and sorry for inconvenience

Best regards

Hi Philippe,

Do you get this new error with Java 9 or with Java 8, too?

Hi sergey,

Yes, java 8 or 9 don’t change anything. Anton asked me to send you the zipped project, but it’s only the start guide download. I’ve not changed a single line!
I’ll nevertheless send to support the zip, and try to find how to send you the Intellij IDEA config.

BTW, Philippe

I’ve just tried building and running generated project from the “bin” directory under Windows OS and it worked just fine.
Please answer Sergey Chupov’s question. Have you tried running .\Coderunner.bat from bin directory using Java 8? Because according to the log.txt you provided you ran the project using Java 9 (see screen attached).

How do you switch the java versions?

I’ll retry in java 8 and send you the log back.

To change the java version, I give you screenshot of all changes + log obtained with a .\CodeRunner.bat launch from bin dir.

Can you please run “java -version” in the bin folder where you run CodeRunner.bat after switching to Java 8?

Java -version is still - java version “9.0.4”

don’t know how to switch version in console