B4J Question PI4J V.2 Rasberry pi4 problem

roberto64

Active Member
Licensed User
Longtime User
Hi, after various tests on rasberry PI4 with B4J and PI4J V.2 in my case I find the discrepancies, I explain, with the version of Java 11.0.7 installed on debiian known that with the result of the program in "(UI javaFX) by a error "Error: --add-modules = requires modules to be specified", instead with java v.14.0.8 it works, but in the execution of the command "Dim bus As JavaObject = GetBus (1)" from error in java, when you use "non-ui console" everything works well, but only with the version of Java v.11.0.7 but it does not show the form. I ask if anyone of the forum had the same problems and if possible share them.
regards
 

roberto64

Active Member
Licensed User
Longtime User
Rasberri pi:
    Dim bus As JavaObject = GetBus(1)
    Dim device As JavaObject = GetDevice(bus, 0x27)
    
    
    
    
Sub GetBus(BusNumber As Int) As JavaObject
    Dim factory As JavaObject
    Return  factory.InitializeStatic("com.pi4j.io.i2c.I2CFactory").RunMethodJO("getInstance", Array As Object(BusNumber))
    End Sub

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…