Support Topics Documentation Slack YouTube Blog

Having trouble developing a service event handler in Java, specifically pushing with CodeRunner


(Cooper Edmunds) #1

I generated the code and downloaded it, as the quick start guide instructs. The downloaded folder has 5 folders in it: log, bin, classes, lib, and src. The src folder has the generated code. I am opening the .java file of the service event handler that I wish to edit and editing it in Eclipse. I then follow the instructions in the quick start guide to open CodeRunner and establish the event handler with Backendless, but it finds no code to run, printing the message “[ERROR] There is no code, which can be deployed to Backendless.”

I’m certain that I am making a very stupid mistake, but I honestly don’t know what it is. I have read the quick start guide and all other documentation provided. Thank you very much! I am not experienced in this arena.


(Sergey Chupov) #2

Hi Cooper,

You need to compile the code and get the .class files. The CodeRunner then pushes the compiled .class files to your backend.


(Mark Piller) #3

Make sure the compiled code is copied into the “classes” directory (along with the subdirectories matching the package names). For example, if your event handler is in the “com.foo.handlers” package, then you should have the following in the “classes” directory:

classes
---\com
------\foo
--------\handlers
-----------\YourHandler.classs

(Cooper Edmunds) #4

Do I only need to put the .class files in the “classes” folder? Or do I also need to put the files from the “src” folder in the “classes” folder?

Thanks, Sergey.


(Mark Piller) #5

Only .class files go into the “classes” folder. See my other comment here.


(Cooper Edmunds) #6

I downloaded IntelliJ IDEA and saw the IDEA file in the downloaded zip from code generation. Worked like a charm. Thank you for your assistance, it was very helpful to me.