Download jar containing IBackendlessService

Hi there, Where can I download the latest JAR file that contains IBackendlessService? The project template download does not have this anymore.
-TY

Hi @David_Pellecchia

You can download the latest jar in the Cloud Code section → Handlers → Download. Please check there.

Regards,
Marina

TY Marina. But I don’t see Backendless.jar in the download.

This is what I get in the download zip file -
-rw-rw-r-- 0 0 0 601 Jun 17 17:44 .project
-rw-rw-r-- 0 0 0 1807 Jun 17 17:44 servercode.ipr
-rw-rw-r-- 0 0 0 142361 Jun 17 17:44 libs/commons-6.7.5.0.jar
-rw-rw-r-- 0 0 0 105112 Jun 17 17:44 libs/servlet-api-2.5.jar
-rw-rw-r-- 0 0 0 13183 Jun 17 17:44 libs/java-client-sdk-7.0.4.jar
-rw-rw-r-- 0 0 0 439056 Jun 17 17:44 libs/weborbclient-5.2.0.8.jar
-rw-rw-r-- 0 0 0 119 Jun 17 17:44 libs/readme.txt
-rw-rw-r-- 0 0 0 499993 Jun 17 17:44 libs/java-sdk-common-7.0.4.jar
-rw-rw-r-- 0 0 0 414 Jun 17 17:44 classes/readme.txt
drwxrwxr-x 0 0 0 0 Jun 17 17:44 src/com/navstation/models/
drwxrwxr-x 0 0 0 0 Jun 17 17:44 src/com/navstation/timers/
drwxrwxr-x 0 0 0 0 Jun 17 17:44 src/com/navstation/events/
-rw-rw-r-- 0 0 0 352 Jun 17 17:44 src/com/navstation/Bootstrap.java
-rw-rw-r-- 0 0 0 1887 Jun 17 17:44 bin/CodeRunner.bat
-rw-rw-r-- 0 0 0 3569 Jun 17 17:44 bin/logback.xml
-rw-rw-r-- 0 0 0 40145622 Jun 17 17:44 bin/CodeRunner.jar
-rw-rw-r-- 0 0 0 57 Jun 17 17:44 bin/Deploy.sh
-rw-rw-r-- 0 0 0 2833 Jun 17 17:44 bin/runner.properties
-rw-rw-r-- 0 0 0 36 Jun 17 17:44 bin/Deploy.bat
-rw-rw-r-- 0 0 0 6000 Jun 17 17:44 bin/security.policy
-rw-rw-r-- 0 0 0 1615750 Jun 17 17:44 bin/weborb.jar
-rw-rw-r-- 0 0 0 2611 Jun 17 17:44 bin/CodeRunner.sh
-rw-rw-r-- 0 0 0 595 Jun 17 17:44 servercode.iml

Hi, David.
The approach to using java-sdk was changed. Now we have builds for plain java, coderunner and for android os.

In detail look here: GitHub - Backendless/java-sdk
In short: you need either java-client-sdk or android-client-sdk package from maven repo.
Maven Central Namespace: com.backendless

If you download CodeRunner project from our site, it already contains all the libraries with all dependencies (jar file in lib dir).

TY @oleg-vyalyh. Can you point me to where in your site I can download the CodeRunner project? Also please confirm the correct JDK version we should be using.

You can download CodeRunner project here:


or

But I also would like to clarify, why are you asking specifically about backendless.jar.
Is there some problem with code compilation or something else?

p.s. the latest version you may found in releases section on GitHub (the link was in the previous post).

Hi Oleg, I will try your suggestions. Regarding Backendless.jar, that is what we have in our class path for the Java cloud code implementation. We need to implement IBackendlessService and backendless.jar used to have that interface.

Hi Oleg, I setup maven and added the below dependency - I am running the ‘com.sample.api.DemoService’ straight from your website.

<dependency>
  		<groupId>com.backendless</groupId>
  		<artifactId>java-client-sdk</artifactId>
  		<version>8.0.0-RC1</version>
  	</dependency>

I am able to get a clean compile now.
But when I run CodeRunner.sh, I get the following error (I am using java 17.0.7 2023-04-18 LTS)

----------------------------------------

Listening for transport dt_socket at address: 5005
04:15:03.436 [INFO] c.b.c.CodeRunnerLoader |main| Local Date and Time: 2023-06-23T04:15:03.435509
04:15:03.443 [INFO] c.b.c.CodeRunnerLoader |main| JDK from "JAVA_HOME" - /Users/x/z-mbp/java/jdk-17.0.7.jdk/Contents/Home
04:15:03.498 [INFO] c.b.c.CommandLineProcessor |main| CodeRunner(tm) Backendless Debugging Utility
04:15:03.498 [INFO] c.b.c.CommandLineProcessor |main| Copyright(C) 2023 Backendless Corp. All rights reserved. 
04:15:03.498 [INFO] c.b.c.CommandLineProcessor |main| Build date: 2023-06-15T15:52:55Z
Version: 7.0.1.21
Build id: 242673
VCS revision: 0bff8cc0069fd307a1f852bc25bbbf87d41954e1
04:15:03.499 [INFO] c.b.c.CommandLineProcessor |main| CodeRunner session is running for 2 hours and will be terminated on 06:15:03.498947[UTC]

WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by com.backendless.coderunner.runtime.security.Security (file:/Users/bswami/z-mbp/z-msh/2023-2-cloudcode/NavStation/bin/CodeRunner.jar)
WARNING: Please consider reporting this to the maintainers of com.backendless.coderunner.runtime.security.Security
WARNING: System::setSecurityManager will be removed in a future release
04:15:03.672 [INFO] c.b.h.HealthCheckHttpServer |main| Management port is absent, management server not started
04:15:03.673 [INFO] c.b.coderunner.LocalCodeRunner |main| Registering runner on: 'https://api.backendless.com'
04:15:03.673 [INFO] c.b.coderunner.LocalCodeRunner |main| Application ID:  '323F3506-11F1-4D64-AA2D-B705C479FE26'
04:15:03.673 [INFO] c.b.coderunner.LocalCodeRunner |main| Api key:         '8F5A741A-BA3C-47E9-8C79-90FF7ACB2C34'
04:15:05.977 [INFO] c.b.coderunner.LocalCodeRunner |main| Runner successfully registered
04:15:05.987 [INFO] c.b.c.parser.EventModelParser |main| Parsing event model...
[WEBORB INFO] Loading local(non-cloud) configuration.
[WEBORB ERROR] unable to find weborb-acl.xml. make sure the file is available in WEB-INF directory of the web application
04:15:06.133 [INFO] c.b.c.runtime.ServiceParser |main| In target directory '../libs' present 0 jar files: []
04:15:06.133 [INFO] c.b.c.r.t.CustomServiceParserTask |main| Service classes size from libs: 0
04:15:06.134 [INFO] c.b.c.r.t.CustomServiceParserTask |main| Service classes size from classes: 0
04:15:06.135 [INFO] c.b.c.r.t.CustomServiceParserTask |main| Service classes is empty
[WEBORB INFO] Loading local(non-cloud) configuration.
[WEBORB ERROR] unable to find weborb-acl.xml. make sure the file is available in WEB-INF directory of the web application
04:15:06.248 [INFO] c.b.c.d.DebuggerConsoleInterface |main| Build successfully: 0 event handlers and 0 timers and 0 services
04:15:06.249 [ERROR] c.b.c.CodeRunnerLoader |main| Could not find any code to be deployed to Backendless at /Users/x/z-mbp/z-msh/2023-2-cloudcode/NavStation/classes. Did you compile the project?
04:15:06.250 [WARN] c.b.coderunner.LocalCodeRunner |Thread-0| Please wait. Stopping all running tasks and started threads, and freeing resources.
04:15:06.360 [INFO] c.b.coderunner.LocalCodeRunner |Thread-0| Debugging Utility disconnected successfully
04:15:06.360 [INFO] c.b.coderunner.LocalCodeRunner |Thread-0| Thank you for using Backendless

I confirmed that NavStation/classes I have the below files.

x@x-MacBook-Pro classes % pwd
/Users/x/z-mbp/z-msh/2023-2-cloudcode/NavStation/classes
x@x-MacBook-Pro classes % ls -la com/sample/api/*
-rw-r--r--  1 x  staff   747 Jun 17 13:21 com/sample/api/DemoComment.class
-rw-r--r--  1 x  staff  1061 Jun 17 13:21 com/sample/api/DemoService.class
  1. The number of the latest stable version you can find here
    GitHub - Backendless/java-sdk

  2. If you download project from our site it already contains the latest versions of CodeRunner and java-sdk. Why was it necessary to attach another one with the maven ? Or you deleted the libs dir?

  3. It is not clear for me, what actions you do after downloading the project?
    Usually the following steps are enough:

  • download the project from our site;
  • put into src dir your code;
  • build the project;
  • run ./bin/CodeRunner.sh

Just an advise: you can use annotation @BackendlessService in order to declare your custom class as a backendless service class.

OK I will try re-doing all the steps from within a fresh workspace.