B4J Question .jar dont run on linux

giga

Well-Known Member
Licensed User
Longtime User
Just a thought. Have you tried to run it from the terminal?

example.
usr/lib/jvm/jre-1.6.0-sun/bin/java -jar %f
(Set the path according to where Java is located on your system)

Also try
sudo chmod +x nameofapp.jar

or

$>java -jar [nameofapp.jar]
 
Upvote 0

Douglas Farias

Expert
Licensed User
Longtime User
found the error thx.
main._verifica_user (java line: 398)
java.lang.NullPointerException
at giga.getMac_getMac.GetMACAddress.getMacAddressFromClient(GetMACAddress.java:47)
at b4j.example.main._verifica_user(main.java:398)
at b4j.example.main._jobdone(main.java:207)
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.keywords.Common.CallSub4(Common.java:447)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:427)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:501)
at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$50(GtkApplication.java:139)
at java.lang.Thread.run(Thread.java:745)

its your lib xD, can u help me on this?
 
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
I work more in windows environments than Linux and have not tested the library in Linux. As I mentioned in the library thread @jmon may have tried it.

What I believe to be happening is one of the following:
1. Not finding the NIC.
2. Not finding the MAC address for the NIC
3. Taking the wrong NIC.
4. Try to run the jar as root.
 
Upvote 0
Top