Hi,
I made a simple library (TMath2) from a Java class using B4J SLC. Compilation is ok (I have to compile two times, first time SLC is missing the class folder), but when I use the library with DIM tm1 As TMath2 in B4J the following error shows up:
Compiling generated Java code. Error
B4J line: 29
End Sub
javac 1.8.0_131
src\b4j\example\main.java:55: error: cannot find symbol
TMath2 _tm1 = null;
^
symbol: class TMath2
location: class main
1 error
Here is the Java Code:
This Code is translated from a C++ Source and the C++ source works with NLG Compiler in B4A.
Another Question is, how to add the shortname feature in the Java Code for XML Output: <shortname>TMath2</shortname>.
I made a simple library (TMath2) from a Java class using B4J SLC. Compilation is ok (I have to compile two times, first time SLC is missing the class folder), but when I use the library with DIM tm1 As TMath2 in B4J the following error shows up:
Compiling generated Java code. Error
B4J line: 29
End Sub
javac 1.8.0_131
src\b4j\example\main.java:55: error: cannot find symbol
TMath2 _tm1 = null;
^
symbol: class TMath2
location: class main
1 error
Here is the Java Code:
B4X:
public class TMath2
{
//Multiplies two doubles (a), (b) and returns result as double
public double tmultiply(double a, double b)
{
return (a * b);
}
/* Divides two doubles (a), (b) and returns result as double */
public double tdivide(double a, double b)
{
return (a / b);
}
/* adds two doubles (a), (b) and returns result as double */
public double tadd(double a, double b)
{
return (a + b);
}
//subtracts two doubles (a), (b) and returns result as double
public double tsubtract(double a, double b)
{
return (a - b);
}
}
This Code is translated from a C++ Source and the C++ source works with NLG Compiler in B4A.
Another Question is, how to add the shortname feature in the Java Code for XML Output: <shortname>TMath2</shortname>.