B4J Question Get LocalIP

Discussion in 'B4J Questions' started by Blueforcer, Dec 4, 2019 at 1:02 PM.

  1. Blueforcer

    Blueforcer Active Member Licensed User

    I trying to get the loacl IP from the device with

    Code:
    Dim IP As ServerSocket
    IP.Initialize(
    8765"")
    dim myIp as String =IP.GetMyIP
    IP.close
    But i get this error:
    Code:
    Dez 04 09:36:50 awtrix-server java[1695]: main._appstart (java line: 151)
    Dez 
    04 09:36:50 awtrix-server java[1695]: java.lang.ClassFormatError: Unknown constant tag 76 in class file java/n
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at java.net.NetworkInterface.<clinit>(NetworkInterface.java:56)
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at anywheresoftware.b4a.objects.SocketWrapper$ServerSocketWrappe
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at de.awtrix.main._appstart(main.java:151)
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at java.lang.reflect.Method.invoke(Method.java:498)
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
    Dez 
    04 09:36:50 awtrix-server java[1695]:         at de.awtrix.main.main(main.java:28)
    What does this mean?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Note that you don't need to initialize ServerSocket for this.

    Which version of Java are you using?
     
  3. Blueforcer

    Blueforcer Active Member Licensed User

    Thank you for the hint.
    I didnt saw that my java version on the raspberry was lower than my project.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice