Backendless Support
 
Answered

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

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.

Leave a Comment

Comments (5)

photo
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.

photo
1

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.

photo
1

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

photo
photo
2

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:

  1. classes
  2. ---\com
  3. ------\foo
  4. --------\handlers
  5. -----------\YourHandler.classs

photo
1

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.