Feb 25, 2014 Replies: 21 This is a simple library that returns the MAC Address of the current PC. Designed to work on B4J **Does not work on B4A** example. Code: Dim S As String Dim ti As jGetMac S = ti.MacAddressFromClient lbl1.Text = S Attachments jGetMac.zip jGetMac.zip 1.9 KB · Views: 1,402 Click to expand...
This is a simple library that returns the MAC Address of the current PC. Designed to work on B4J **Does not work on B4A** example. Code: Dim S As String Dim ti As jGetMac S = ti.MacAddressFromClient lbl1.Text = S
jmon Well-Known Member Licensed User Longtime User Feb 27, 2014 #2 Does it work on Linux and Mac? I think that if you have more functions like this, (like jDiskspace) you should regroup them in a library called jOsUtils or something like that. Thanks for sharing, I will use it for sure
Does it work on Linux and Mac? I think that if you have more functions like this, (like jDiskspace) you should regroup them in a library called jOsUtils or something like that. Thanks for sharing, I will use it for sure
giga Well-Known Member Licensed User Longtime User Feb 27, 2014 #3 I have not tested it on Linux or Mac, only Windows. I am in the process of combining libraries since JGetMac is a single return it makes sense to combine. I have a few more utilities coming to the forum. Just cleaning up the bugs before I release them.
I have not tested it on Linux or Mac, only Windows. I am in the process of combining libraries since JGetMac is a single return it makes sense to combine. I have a few more utilities coming to the forum. Just cleaning up the bugs before I release them.
rwblinn Well-Known Member Licensed User Longtime User Feb 28, 2014 #4 Hi, thanks for sharing this. FYI: In exploring B4J capabilities, did seek for building this functionality with B4J instead of Java. See (http://www.rwblinn.de/b4j/b4jhowto/examples/b4jhowtojavaobject.zip) which is one of my B4J HOWTOs example projects. Select net.NetNetworkInterface from the accordion.
Hi, thanks for sharing this. FYI: In exploring B4J capabilities, did seek for building this functionality with B4J instead of Java. See (http://www.rwblinn.de/b4j/b4jhowto/examples/b4jhowtojavaobject.zip) which is one of my B4J HOWTOs example projects. Select net.NetNetworkInterface from the accordion.
magoandroid Member Licensed User Longtime User Feb 28, 2014 #5 rwblinn said: FYI: In exploring B4J capabilities, did seek for building this functionality with B4J instead of Java. See (http://www.rwblinn.de/b4j/b4jhowto/examples/b4jhowtojavaobject.zip) which is one of my B4J HOWTOs example projects. Select net.NetNetworkInterface from the accordion. Click to expand... Thanks Rob, always great contributions. MAgo
rwblinn said: FYI: In exploring B4J capabilities, did seek for building this functionality with B4J instead of Java. See (http://www.rwblinn.de/b4j/b4jhowto/examples/b4jhowtojavaobject.zip) which is one of my B4J HOWTOs example projects. Select net.NetNetworkInterface from the accordion. Click to expand... Thanks Rob, always great contributions. MAgo
tsteward Well-Known Member Licensed User Longtime User Dec 22, 2014 #6 Does not return MAC Address on a MAC. This is a mixture of window, android and the last one is a MAC
giga Well-Known Member Licensed User Longtime User Dec 30, 2014 #7 tsteward said: Does not return MAC Address on a MAC. This is a mixture of window, android and the last one is a MAC View attachment 30531 Click to expand... I am researching/working on a new version that should work for mac.
tsteward said: Does not return MAC Address on a MAC. This is a mixture of window, android and the last one is a MAC View attachment 30531 Click to expand... I am researching/working on a new version that should work for mac.
giga Well-Known Member Licensed User Longtime User Jan 11, 2015 #8 tsteward said: Does not return MAC Address on a MAC. This is a mixture of window, android and the last one is a MAC View attachment 30531 Click to expand... @tsteward What mac OS are you using?
tsteward said: Does not return MAC Address on a MAC. This is a mixture of window, android and the last one is a MAC View attachment 30531 Click to expand... @tsteward What mac OS are you using?
tsteward Well-Known Member Licensed User Longtime User Jan 11, 2015 #9 I have no idea I emailed my program to a friend to test my registration procedure for me. Your library returned MacBook-Pro.local: MacBook-Pro.local: nodename nor servname provided, or not known Click to expand...
I have no idea I emailed my program to a friend to test my registration procedure for me. Your library returned MacBook-Pro.local: MacBook-Pro.local: nodename nor servname provided, or not known Click to expand...
giga Well-Known Member Licensed User Longtime User Feb 10, 2015 #10 giga said: I am researching/working on a new version that should work for mac. Click to expand... @tsteward I have been researching this error "MacBook-Pro.local: MacBook-Pro.local: nodename nor servname provided, or not known". What I can see this may be a bug in Java 7 according to http://stackoverflow.com/questions/...s-getlocalhost-work-okay-with-java-6-but-fail If they upgrade java to version 8 does it work?
giga said: I am researching/working on a new version that should work for mac. Click to expand... @tsteward I have been researching this error "MacBook-Pro.local: MacBook-Pro.local: nodename nor servname provided, or not known". What I can see this may be a bug in Java 7 according to http://stackoverflow.com/questions/...s-getlocalhost-work-okay-with-java-6-but-fail If they upgrade java to version 8 does it work?
tsteward Well-Known Member Licensed User Longtime User Feb 11, 2015 #12 yes upgrading to java v8 solved it. now when he registers it sends me his mac addy.
Douglas Farias Expert Licensed User Longtime User Jul 29, 2015 #14 many thx for this lib. anyone know if this works fine on linux?
giga Well-Known Member Licensed User Longtime User Jul 30, 2015 #15 I have not tested it on Linux or Ubuntu. I believe @jmon has tried it not sure though.
Fernando Melo Member Licensed User Longtime User Nov 23, 2015 #16 In Linux, didnt work, I use this: Code: mac = File.ReadString("/sys/class/net/eth0","address")
Nokia Active Member Licensed User Longtime User Apr 29, 2016 #17 I get error if I have no active internet connection.. Program started. Error occurred on line: 179 (Main) java.lang.NullPointerException at giga.getMac_getMac.GetMACAddress.getMacAddressFromClient(GetMACAddress.java:50) at b4j.example.main._appstart(main.java:308) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:607) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90) at anywheresoftware.b4a.BA.raiseEvent(BA.java:84) at b4j.example.main.start(main.java:36) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at java.lang.Thread.run(Thread.java:745)
I get error if I have no active internet connection.. Program started. Error occurred on line: 179 (Main) java.lang.NullPointerException at giga.getMac_getMac.GetMACAddress.getMacAddressFromClient(GetMACAddress.java:50) at b4j.example.main._appstart(main.java:308) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:607) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90) at anywheresoftware.b4a.BA.raiseEvent(BA.java:84) at b4j.example.main.start(main.java:36) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at java.lang.Thread.run(Thread.java:745)
giga Well-Known Member Licensed User Longtime User May 2, 2016 #18 What OS are you working with? Are you using the example above?
Nokia Active Member Licensed User Longtime User May 4, 2016 #19 giga said: What OS are you working with? Are you using the example above? Click to expand... Windows Vista, and I am working with example above.. Code: Dim ti As jGetMac Log(ti.MacAddressFromClient)
giga said: What OS are you working with? Are you using the example above? Click to expand... Windows Vista, and I am working with example above.. Code: Dim ti As jGetMac Log(ti.MacAddressFromClient)
giga Well-Known Member Licensed User Longtime User May 5, 2016 #20 Nokia said: Windows Vista, and I am working with example above.. Code: Dim ti As jGetMac Log(ti.MacAddressFromClient) Click to expand... Do you have more than one network card? Your code works on my Windows 7 system.
Nokia said: Windows Vista, and I am working with example above.. Code: Dim ti As jGetMac Log(ti.MacAddressFromClient) Click to expand... Do you have more than one network card? Your code works on my Windows 7 system.