B4J Code Snippet Icon System Tray Example (Inline Java version) - jkhazraji    
Mar 15, 2025   
(3 reactions)
Private ps As JavaObject
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
Dim JavaFXTrayIconSample As JavaObject
JavaFXTrayIconSample.InitializeNewInstance(getPackageName & ".main$SystemTrayExample", Array(Null))
End Sub
Private Sub getPackageName() As String
Dim joBA As JavaObject
joBA....GetField("packageName"))
Return joBA.GetField("packageName")
End Sub
#if JAVA...
B4J Code Snippet B4J Single Instance checker (Windows & Linux) irrespective of the Java version and packager used - walt61    
Jul 4, 2023   
(1 reaction) exception "java.sql.SQLException: database is locked" if another instance was already.../threads/new-sqlite-jdbc-version-3-36-0-1-2021-06-30.132348/
EDIT: added the 'Note' comment...
link: Added a Linux-specific block to method 'ImAlreadyRunning'....
link: running. Launch4J (the B4J packager I used with Java 8) has a 'single instance' option...
link: . Launch4J (the B4J packager I used with Java 8) has a 'single instance' option...
B4J Library [tool] Compile project with different version of Java - Erel    
Jan 31, 2021   
(9 reactions)Don't use this. Starting from B4J v8.80 there is a built-in option (#JavaCompilerPath): https... these comments to your project:
'Compile with Java 8: ide://run?file=%B4X%\ProjectCompiler.jar...
link: more complicated.
Old Java 8 doesn't like very large compiler heap sizes on my machine, while...
link: The full error message will be in the logs.
Different compiler heap sizes
Why??? Never encountere...
link: Different compiler heap sizes, full error messages, integration with B4X-Bridge.
But then I'll a...
B4J Question [RESOLVED I think] java version for AWS Lambda - JackKirk    
Jan 27, 2024Hi,
I'm after a bit of java knowledge that escapes me.
I would like to explore using AWS Lambda (https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)
There seem to be a range of java...
link: the B4J projects that involve targeting AWS Lambda Java. You can use the #JavaCompilerPath...
link: the appropriate Amazon Corretto and use it for the B4J projects that involve targeting AWS Lambda Java...
link: I subscribe to AWS paid support.
I opened a case:
There seem to be a range of java runtimes...
B4J Question [Server] Java runtime version - Alessandro71    
Oct 30, 2025Currently, B4J has JDK 19 as the supported version and my jar is compiled on that.
While setting up an hosting environment for a jServer-based application on AWS, I have only choices between the Amazon custom JRE 17, 21 or 23.
By best guess I'd choose 21, but is there any caveat to be aware of?...
link: No problem. It should work....
B4J Tutorial CSS Utils and JavaFX version (FYI) - PaulMeuris    
Oct 18, 2022   
(1 reaction)When using the CSS Utils library in a new B4J project i found that there is a newer document for the Javafx CSS properties webpage.
In the (old - 2015) thread CSS Utils you can find a link to the CSS properties (Javafx 1.3).
The latest version of the CSS Utils library uses javafx 8. The new link is: Javafx 8.
134941
The old document mentions under the heading Labeled for a label text wrap: -fx-text-wrap.
In the new document this changed to: -fx-wrap-text
This might be a little confusing...
B4J Question Java version and Lambda Expressions - Roycefer    
Jun 28, 2015Using lambda expressions in inline Java code results in the following compile-time error:
B4J version: 3.02
Parsing code. (0.00s)
Compiling code. (0.02s)
Compiling generated Java code...
link: Hi,
Indeed I agree in such a situation it would need lots of work.
The CallSub() is indeed powerfu...
link: As far as I know, Android is still stuck at the Java 7 language level, which doesn't support...
link: Which brings me to the following question ...
why not implement Lambda expressions directly into B4...
B4J Question Confusion about Java version - marcick    
Oct 7, 2021 "java -jar sample.jar" and everything works.
But wich java version is using my app in... where I have installed B4J, I have downloaded OpenJdk-11 in c:\Java folder. Then I declare the Java.exe...
link: Yes, I saw discrepance using Java-version and then wrote here.
I'll try the standalone package...
link: Tip: you can always run java -version to find the java version.
If you are building a standalone...
link:
But wich java version is using my app in the destination computer ?
When you install java in...
Other MSSQL database Connection: inline-Java version - jkhazraji    
Nov 6, 2021.LoadLayout("Layout1")
MainForm.Show
Dim MyJO As JavaObject = Me
Dim server...))
Log(s)
End Sub
#if Java
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql...
link: , "password")
End Sub
'Template version: B4J-1.0
#Region Delegates
Sub MainForm_FocusChanged...
link:
show me an example in this forum that uses Microsoft drivers
Please open a new question. :)...
B4J Question Java versions and the IDE - Daestrum    
Mar 12, 2020Does the IDE only allow Java versions 8 and 11 to be compiled ?
If I set the tools path to java 8... java 14 javac, it compiles in java 8 although the GetSystemProperty("java.version","...
link: OpenJDK is updated. You can build your own package based on Java 11. You will just need to combine...
link: fixes. So we are basically using the version that was originally posted by yourself, when java 11...
link: No. The IDE will not detect the version properly.
Java 14 is a short term supported version. Why...
Page: 1  
2  
3  
4  
5  
6  
7