Call Remote Java Methods using JKRemoteReflection

Last updated: 2025-09-14

Server

  1. Create Maven project with the followig POM file:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-core/java-util-remote-reflection-tutorial.adoc - include::inc/remote-reflection/server/pom.xml[]

If you are using Eclipse, be sure to refresh your project (select your project→ right click→ Maven→ Update Project)

  1. Create Service class with the following contents:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-core/java-util-remote-reflection-tutorial.adoc - include::inc/remote-reflection/server/src/main/java/com/app/server/Service.java[]
  1. Create App class with the following contents:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-core/java-util-remote-reflection-tutorial.adoc - include::inc/remote-reflection/server/src/main/java/com/app/server/App.java[]

Now run the App main class, you should see something like this:

reflection server

Client

  1. Create Maven project with the followig POM file:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-core/java-util-remote-reflection-tutorial.adoc - include::inc/remote-reflection/client/pom.xml[]
  1. Create the client App class with the following contents:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-core/java-util-remote-reflection-tutorial.adoc - include::inc/remote-reflection/client/src/main/java/com/app/client/App.java[]

Now run the App main class, you should see something like this:

reflection client

Full example source-code can be found at https://github.com/smartapi-com/j-framework-remote-reflection