### Compiler Messages

Hints on messages from the Java Compiler.
Object should first be initialized (AnchorPane)
Check if there are new or renamed nodes in the layout(s) defined.
The names must match between the layout(s) and the B4J code under Sub Process Globals.
The layout file(s) must be located in the Project Files folder (DirAssets).
Java.lang.RuntimeException: Method: HelloWorldParameter not matched.
The parameter for the method is not matching the parameter definition.
Example of a JavaObject RunMethod with wrong parameter.
Wrong
joInlineLava.RunMethod("HelloWorldParameter", Null)
Right
joInlineLava.RunMethod("HelloWorldParameter", Array("Hello World!"))
The method HelloWorldParameter expects a String as Parameter.
'Log string as parameter
#If JAVA
public static void HelloWorldParameter(String s) {
BA.Log("(void HelloWorldParameter(String) " + s);
System.out.println("(void HelloWorldParameter(String) " + s);
}
#End If
IMPORTANT
When using JavaObjects with the RunMethod ensure to use the right type of parameters and the right number.
Check the relevant API documentation to go for sure.
Error: Package javafx.application does not exist
Ensure to use the latest Java JDK version.
To check with Java JDK version, run from the command line:
Run Java with parameter -version from the JDK Bin Folder
c:\Program Files (x86)\Java\jdk7\bin>java -version
OR if the JDK Folder is added to the PATH:
java -version
Error: Error while writing main_subs_0: could not create parent directories
There is another process locking a file or folder in the B4J project folders.
Error: Compiler Error Convert byte code - optimized dex
When during compile, the compiler stops at
'Convert byte code - optimized dex'
then try to increase the parameter MaxRamForDex in the ini file b4xv5.ini, located in C:\Users\\AppData\Roaming\Anywhere Software\B4J.
Change:
MaxRamForDex=512
To:
MaxRamForDex=1024
Error: java.lang.ClassNotFoundException: javafx.scene.control.Dialog
Install Java JDK v8u40+ and configure the IDE to use it:
Tools > Configure Path > javac.exe, set the path to the javac compiler
Error: java.lang.Exception: Sub appstart signature does not match expected signature.
This means for example, that a UI app has been created with Non-UI AppStart parameter (in Sub AppStart).
Example:
For a UI application, the parameter for AppStart are:
Sub AppStart (Form1 As Form, Args() As String)
For a Non-UI application, the parameter for AppStart are:
Sub AppStart (Args() As String)

Changed: , Category: Application Development, File: T6C160M1192.htm, ID: 1192