Attached project demonstrates two ways to interface with a JAR file:
1. Using the JavaObject run method "directly"
2. Making use of inline Java code
For method 1 you need to make use of
#AdditionalJar: fiddleAround in the B4A code (see the code)
For method 2 you need to make use of
import com.johan.Geometry.Geometry; (see inline Java code)
com.johan.Geometry is a package name within fiddleAround.Jar
com.johan.Geometry.Geometry is a class within package com.johan.Geometry
sphereVolume and sphereSurface are methods within class Geometry
Project prints to the project log only.
Amazing what you can see inside a JAR when using a Java decompiler
It can make life much simpler when trying to use a/interface with a foreign JAR file.
fiddleAround.jar and fiddleAround.xml that are used in this example are inside the /files folder of the attached project.
1. Using the JavaObject run method "directly"
2. Making use of inline Java code
For method 1 you need to make use of
#AdditionalJar: fiddleAround in the B4A code (see the code)
For method 2 you need to make use of
import com.johan.Geometry.Geometry; (see inline Java code)
com.johan.Geometry is a package name within fiddleAround.Jar
com.johan.Geometry.Geometry is a class within package com.johan.Geometry
sphereVolume and sphereSurface are methods within class Geometry
Project prints to the project log only.
Amazing what you can see inside a JAR when using a Java decompiler
It can make life much simpler when trying to use a/interface with a foreign JAR file.
fiddleAround.jar and fiddleAround.xml that are used in this example are inside the /files folder of the attached project.