B4J Question Can not run B4J simple app on ubuntu

microbox

Active Member
Licensed User
Longtime User
I created a simple gui B4j based app. compiled in release mode and copied the executable jar file into a usb. And plug it on my odroid U3 device with ubuntu os. When I right click the jar file, It has no option to run the application. I also tried to follow this guide(http://askubuntu.com/questions/192914/how-run-a-jar-file-with-a-double-click) But I'm getting error.
B4X:
odroid@odroid:~$ sudo add-apt-repository ppa:ferramroberto/java
PPA esclusivo per l'ultima versione disponibile di JAVA

PPA for the latest version of JAVA

PPA für die neueste Version von JAVA

PPA para la última versión de JAVA

PPA pour la dernière version de JAVA


by LffL http://www.lffl.org

More info: https://launchpad.net/~ferramroberto/+archive/java
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpa5qy5j/secring.gpg' created
gpg: keyring `/tmp/tmpa5qy5j/pubring.gpg' created
gpg: requesting key 3ACC3965 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpa5qy5j/trustdb.gpg: trustdb created
gpg: key 3ACC3965: public key "Launchpad lffl" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:              imported: 1  (RSA: 1)
OK
odroid@odroid:~$ sudo apt-get update
Ign http://ppa.launchpad.net saucy InRelease                                                      
Ign http://ports.ubuntu.com saucy InRelease
Ign http://ppa.launchpad.net saucy Release.gpg
Ign http://ports.ubuntu.com saucy-updates InRelease
Ign http://ppa.launchpad.net saucy Release
Ign http://ports.ubuntu.com saucy-security InRelease
Get:1 http://ports.ubuntu.com saucy Release.gpg [933 B]
Get:2 http://ports.ubuntu.com saucy-updates Release.gpg [933 B]
Get:3 http://ports.ubuntu.com saucy-security Release.gpg [933 B]
Get:4 http://ports.ubuntu.com saucy Release [49.6 kB]    
Get:5 http://ports.ubuntu.com saucy-updates Release [49.6 kB]                                        
Get:6 http://ports.ubuntu.com saucy-security Release [49.6 kB]                                        
Err http://ppa.launchpad.net saucy/main armhf Packages                                                
  404  Not Found
Ign http://ppa.launchpad.net saucy/main Translation-en_US                                            
Ign http://ppa.launchpad.net saucy/main Translation-en                                                
Get:7 http://ports.ubuntu.com saucy/main Sources [1,009 kB]                                          
Get:8 http://ports.ubuntu.com saucy/restricted Sources [4,759 B]                                      
Get:9 http://ports.ubuntu.com saucy/universe Sources [6,108 kB]                                      
Get:10 http://ports.ubuntu.com saucy/multiverse Sources [175 kB]                                      
Get:11 http://ports.ubuntu.com saucy/main armhf Packages [1,217 kB]                                  
Get:12 http://ports.ubuntu.com saucy/restricted armhf Packages [14 B]                                
Get:13 http://ports.ubuntu.com saucy/universe armhf Packages [5,495 kB]                              
Get:14 http://ports.ubuntu.com saucy/multiverse armhf Packages [112 kB]                              
Hit http://ports.ubuntu.com saucy/main Translation-en                                                
Hit http://ports.ubuntu.com saucy/multiverse Translation-en                                          
Hit http://ports.ubuntu.com saucy/restricted Translation-en                                          
Get:15 http://ports.ubuntu.com saucy/universe Translation-en [3,885 kB]                              
Get:16 http://ports.ubuntu.com saucy-updates/main Sources [91.2 kB]                                  
Get:17 http://ports.ubuntu.com saucy-updates/restricted Sources [14 B]                                
Get:18 http://ports.ubuntu.com saucy-updates/universe Sources [69.9 kB]                              
Get:19 http://ports.ubuntu.com saucy-updates/multiverse Sources [2,348 B]                            
Get:20 http://ports.ubuntu.com saucy-updates/main armhf Packages [242 kB]                            
Get:21 http://ports.ubuntu.com saucy-updates/restricted armhf Packages [14 B]                        
Get:22 http://ports.ubuntu.com saucy-updates/universe armhf Packages [156 kB]
Get:23 http://ports.ubuntu.com saucy-updates/multiverse armhf Packages [1,316 B]                      
Get:24 http://ports.ubuntu.com saucy-updates/main Translation-en [118 kB]                            
Get:25 http://ports.ubuntu.com saucy-updates/multiverse Translation-en [1,688 B]                      
Hit http://ports.ubuntu.com saucy-updates/restricted Translation-en
Get:26 http://ports.ubuntu.com saucy-updates/universe Translation-en [85.5 kB]
Get:27 http://ports.ubuntu.com saucy-security/main Sources [52.1 kB]                                  
Get:28 http://ports.ubuntu.com saucy-security/restricted Sources [14 B]                              
Get:29 http://ports.ubuntu.com saucy-security/universe Sources [8,834 B]                              
Get:30 http://ports.ubuntu.com saucy-security/multiverse Sources [1,825 B]                            
Get:31 http://ports.ubuntu.com saucy-security/main armhf Packages [148 kB]                            
Get:32 http://ports.ubuntu.com saucy-security/restricted armhf Packages [14 B]                        
Get:33 http://ports.ubuntu.com saucy-security/universe armhf Packages [42.7 kB]                      
Get:34 http://ports.ubuntu.com saucy-security/multiverse armhf Packages [1,316 B]                    
Get:35 http://ports.ubuntu.com saucy-security/main Translation-en [78.0 kB]                          
Get:36 http://ports.ubuntu.com saucy-security/multiverse Translation-en [1,566 B]                    
Hit http://ports.ubuntu.com saucy-security/restricted Translation-en                                  
Get:37 http://ports.ubuntu.com saucy-security/universe Translation-en [29.3 kB]                      
Ign http://ports.ubuntu.com saucy/main Translation-en_US                                              
Ign http://ports.ubuntu.com saucy/multiverse Translation-en_US
Ign http://ports.ubuntu.com saucy/restricted Translation-en_US
Ign http://ports.ubuntu.com saucy/universe Translation-en_US
Ign http://ports.ubuntu.com saucy-updates/main Translation-en_US
Ign http://ports.ubuntu.com saucy-updates/multiverse Translation-en_US
Ign http://ports.ubuntu.com saucy-updates/restricted Translation-en_US
Ign http://ports.ubuntu.com saucy-updates/universe Translation-en_US
Ign http://ports.ubuntu.com saucy-security/main Translation-en_US
Ign http://ports.ubuntu.com saucy-security/multiverse Translation-en_US
Ign http://ports.ubuntu.com saucy-security/restricted Translation-en_US
Ign http://ports.ubuntu.com saucy-security/universe Translation-en_US
Fetched 19.3 MB in 15min 29s (20.7 kB/s)
W: Failed to fetch http://ppa.launchpad.net/ferramroberto/java/ubuntu/dists/saucy/main/binary-armhf/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
odroid@odroid:~$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
[sudo] password for odroid:
Sorry, try again.
[sudo] password for odroid:
Reading package lists... Done
Building dependency tree    
Reading state information... Done
Package sun-java6-fonts is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'sun-java6-jre' has no installation candidate
E: Unable to locate package sun-java6-plugin
E: Package 'sun-java6-fonts' has no installation candidate
odroid@odroid:~$
I'm new to linux/Ubuntu...Sorry if this is not the right place to post it here. Hope anyone can help me out.

Thank you in advance.
 

microbox

Active Member
Licensed User
Longtime User
You should install Java 7 JRE. It will not work with Java 6.
Hello... I issued this command "sudo apt-get install openjdk-7-jre" after download I right click the jar file and there is an option "Open with OpenJdk Java 7 Runtime" but when I select it, I have the following form displays...please see attached image.

Result.png
What do you think I'm missing?

Thank you and kind regards.
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
Hi MaFu..thank you for the time. I did follow your suggestion. After issuing the command, I don't have the warning display form. But the jar file does not execute(double clicking/ or right click and open with openjdk Java 7 Runtime").
result2.png
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
Try to run it from the command line with java -jar <jar file>
Hello Erel, issuing the command gives me..
B4X:
odroid@odroid:~/Documents/RFID$ java -jar RfidTest.jar
eglGetDisplay returned EGL_NO_DISPLAYGraphics Device initialization failed for :  es2
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
    at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:300)
    at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:243)
    at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:178)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:210)
    at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:637)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:345)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:304)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:491)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:754)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:98)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:128)
    at java.lang.Thread.run(Thread.java:724)
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:491)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:754)
Caused by: java.lang.RuntimeException: No toolkit found
    at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:190)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:210)
    at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:637)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:345)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:304)
    ... 5 more
odroid@odroid:~/Documents/RFID$
Any idea what I'm lacking?
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hi Microbox

Have you sorted out your issue ? Maybe I can help. I have Ubuntu 12.04 running. I upgraded to Java 7. I have written an IP server app which connects to a window NT 2008 server running SQL Server 2005. I have a client program that running on windows vista which connects to the Ubuntu Machine and send a packet every 10ms, assuming the last packet was acknowledged.

We are currently testing the viability of B4J as our new development platform. I also run the server app on the window NT server. The Client app can connect to both servers Linux/Windows. I have 18 connections to both and recorded 1,496,323 packet writes to the SQL DB in just 3 hours.

Erel, if you are reading this, in the server app I have a client class, am I correct in assuming that each time a new instance of the client socket class is created it is on a new thread, not the main thread.

So Microbox drop me a line if you need any help.

Regards

John.
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
Hello John.. I was using an odroid U3 device with their version of ubuntu. And in their forum told me that the device have issues regarding JavaFX (I think it's about the hardware performance) application running on them. I will try to get a beaglebone black soon to test B4J.

Thank you anyway.
 
Upvote 0
Top