This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to enable java GUI in ARM based Linux system.

Hi This is suresh.I am new for embedded linux system.Actually i bought one single board computer. They used AM3354BZCZ80 IC .The board is working good.But my issue is i want run my .jar application on my linux board.So i got follwoing command "java -jar first.jar" (without quotation) from the net . But i got SWING and AWT Exeptionhandling error. So i have tried to know about that error in the net.But still i didn't get correct solution .Right now i have installed "ejre1.7.0_51.tar" java .I don't know clearly  my java is not supported GUI or not. If i need to run ,what should i do.Here i have attached one of application screen shot.But already we have tested GPOS(Windows 7 & XP).But right now we are moving to RTOS based linux.I don't asking about desktop GUI or application icons.Simply what am i saying , i need to boot my board by linux kernel without ubuntu ,fedora or any other skins. and i have to install my .jar application. Please give me some ideas.

  • Hi,

    If you want to work with JAVA GUI then you may need "Head full support java" packages required that need to be download from oracle web (may need sign in & authentication )

  • Hi ,

    Thank you so much for your reply.Please can you attach me that link (for Head full support java).I bought my board from third party.Just go through following link.  http://www.phytec.in/products/sbc/wega.html So please give me download link for my board. Because i got more confusion in oracle site. Because they have attached so many links java SE java ME .So many things are there.That why i am saying.

  • Hi,

    Sorry, I can't provide exact download link.

    Please search "armv7 head full java support" keyword in google and hopefully you may get download page.

  • Hi ,

    No problem .i have downloaded that file.Actually i saw the links header and headerless already you said. Right now i have download header type files ,that is ejre1.7.0_60 .But i got error "java: Permission denied" like that.But before i used ejre1.7.0_51 file with headerless type .But i couldn't run my java GUI.So i need to install ejre1.7.0_60 without permission denied error.Here i have attached my screen shot

  • Hi,

    Please make sure that java folder has execute permission.

    chmod 777 /home/ejre-1.7.0.51/bin

  • Hi ,

      Right now my problem is i can able to install ejre1.7.0_51 file.But this file headless type.So i have downloaded from the net following files ejre1.7.0_10 and ejre1.7.0_60 with headfull type.After i trying to install my embedded pc .But i can't install .i used java -version command for checking purpose. But i can able to install ejre1.7.0_51 file.Please can u predict any solution

  • Hi,

    .i used java -version command for checking purpose. But i can able to install ejre1.7.0_51 file.Please can u predict any solution

    Simply try to execute "java" and tell me what is the results.

    Are you getting the same problem like "permission denied" after you gave "777" permission as I said previous post ?

    Just try the blow command to check the information about the "java" executable.

    host-ubuntu $ file ejre1.7.0_60/bin/java

  • Still I didn't install Ubuntu skins. Then how can I run the following commands 

    host-ubuntu $ file ejre1.7.0_60/bin/java

  • Hi,

    Still I didn't install Ubuntu skins. Then how can I run the following commands

    I knew, Just I want to know that what type of file is this (java),

    Ex:

    ti@titus:/home/titus/ti-e2e/uvccapture-master$ file uvccapture
    uvccapture: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
    ti@titus:/home/titus/ti-e2e/uvccapture-master$

  • Hi Titusrathinaraj Stalin,

                 I can't understand . How can i go to that target folder or drive.I searched that file name .But I didn't get it. That means , can you give me location.

  • Hi Suresh,

    Could you please give the link that you downloaded the java.

  • Hi Titusrathinaraj Stalin,

    I have downloaded from the following link.

    http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/javase-embedded-downloads-2209751.html

    i have downloaded following files .And check it out one by one.

    Downloadejre-7u60-fcs-b19-linux-arm-vfp-hflt-client_headful-07_may_2014.tar.gz

    Downloadejre-7u60-fcs-b19-linux-arm-vfp-sflt-client_headful-07_may_2014.tar.gz

  • Hi Suresh,

    I'm able to run java on my armv7 platform.

    Logs:

    root@keystone-evm:/ejre1.7.0_60# ls
    COPYRIGHT                    bin
    README                       lib
    THIRDPARTYLICENSEREADME.txt  release
    root@keystone-evm:/ejre1.7.0_60# cd bin/
    root@keystone-evm:/ejre1.7.0_60/bin# ls
    java     keytool
    root@keystone-evm:/ejre1.7.0_60/bin# ./java
    Usage: java [-options] class [args...]
               (to execute a class)
       or  java [-options] -jar jarfile [args...]
               (to execute a jar file)
    where options include:
        -d32          use a 32-bit data model if available
        -d64          use a 64-bit data model if available
        -client       to select the "client" VM
        -server       is a synonym for the "client" VM  [deprecated]
                      The default VM is client.

        -cp <class search path of directories and zip/jar files>
        -classpath <class search path of directories and zip/jar files>
                      A : separated list of directories, JAR archives,
                      and ZIP archives to search for class files.
        -D<name>=<value>
                      set a system property
        -verbose:[class|gc|jni]
                      enable verbose output
        -version      print product version and exit
        -version:<value>
                      require the specified version to run
        -showversion  print product version and continue
        -jre-restrict-search | -no-jre-restrict-search
                      include/exclude user private JREs in the version search
        -? -help      print this help message
        -X            print help on non-standard options
        -ea[:<packagename>...|:<classname>]
        -enableassertions[:<packagename>...|:<classname>]
                      enable assertions with specified granularity
        -da[:<packagename>...|:<classname>]
        -disableassertions[:<packagename>...|:<classname>]
                      disable assertions with specified granularity
        -esa | -enablesystemassertions
                      enable system assertions
        -dsa | -disablesystemassertions
                      disable system assertions
        -agentlib:<libname>[=<options>]
                      load native agent library <libname>, e.g. -agentlib:hprof
                      see also, -agentlib:jdwp=help and -agentlib:hprof=help
        -agentpath:<pathname>[=<options>]
                      load native agent library by full pathname
        -javaagent:<jarpath>[=<options>]
                      load Java programming language agent, see java.lang.instrument
        -splash:<imagepath>
                      show splash screen with specified image
    See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin# uname -a
    Linux keystone-evm 3.10.10 #1 SMP Sun Nov 24 16:25:07 EST 2013 armv7l GNU/Linux
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin# ./java -version
    java version "1.7.0_60"
    Java(TM) SE Embedded Runtime Environment (build 1.7.0_60-b19)
    Java HotSpot(TM) Embedded Client VM (build 24.60-b09, mixed mode)
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#
    root@keystone-evm:/ejre1.7.0_60/bin#

  • Hi Titusrathinaraj Stalin,

    It's nice. I understood.

    1.Can you post your ejre1.7.0_60 installation procedure (sequence of the commands).Because i will compare with my commands .That is very useful for me. 

    2. I can able to install ejre1.7_51 file only .But this file headless support .So i can't run mouse ,keyboard or touch event. Instead of  ejre1.7_51 file , if i installed any other file(ejre1.7.0_60), i got java: not found error.Is there any procedure to installation.

  • Hi Suresh,

    Is there any procedure to installation.


    No, I just untar/extract the java headful package into my filesystem directory.

    Log:

    root@keystone-evm:# tar -zxvf  ejre-7u60-fcs-b19-linux-arm-vfp-hflt-client_headful-07_may_2014.tar.gz
    ejre1.7.0_60/
    ejre1.7.0_60/THIRDPARTYLICENSEREADME.txt
    ejre1.7.0_60/release
    ejre1.7.0_60/COPYRIGHT
    ejre1.7.0_60/lib/
    ejre1.7.0_60/lib/fontconfig.Turbo.bfc
    ejre1.7.0_60/lib/classlist
    ejre1.7.0_60/lib/logging.properties
    ejre1.7.0_60/lib/jsse.jar
    ejre1.7.0_60/lib/fontconfig.SuSE.10.properties.src
    ejre1.7.0_60/lib/fontconfig.RedHat.5.bfc
    ejre1.7.0_60/lib/fontconfig.SuSE.11.bfc
    ejre1.7.0_60/lib/management-agent.jar
    ejre1.7.0_60/lib/calendars.properties
    ejre1.7.0_60/lib/resources.jar
    ejre1.7.0_60/lib/jvm.hprof.txt
    ejre1.7.0_60/lib/sound.properties

    .....
    ......

    root@keystone-evm:/# cd /ejre1.7.0_60

    root@keystone-evm:/ejre1.7.0_60# ls
    COPYRIGHT                    bin
    README                       lib
    THIRDPARTYLICENSEREADME.txt  release
    root@keystone-evm:/ejre1.7.0_60# cd bin/
    root@keystone-evm:/ejre1.7.0_60/bin# ls
    java     keytool
    root@keystone-evm:/ejre1.7.0_60/bin# ./java
    Usage: java [-options] class [args...]
               (to execute a class)
       or  java [-options] -jar jarfile [args...]
               (to execute a jar file)
    where options include:
        -d32          use a 32-bit data model if available
        -d64          use a 64-bit data model if available

  • Hi Titusrathinaraj Stalin,

    Right now i have solved lot of problems.Right now i can able to install any java version.But i got it appication running error.My java need to run  libXext.so.6 file .But that file not available in my java lib folder. Did you get this error.Here i have attached my screen shot . i have run test.jar .This is one my sample application.And also attached my test.jar file. So please can you make it run and check it your board.Here i can't attached my test.jar file.Otherwise , i have attached that file for checking purpose.

     

     

  • Hi,

    This is one my sample application.And also attached my test.jar file. So please can you make it run and check it your board.Here i can't attached my test.jar file.Otherwise , i have attached that file for checking purpose.


    I can't see your attachment, If any problem , please rename test.jar to test.txt and attach it here.

  • Hi Titusrathinaraj Stalin,

      I rename that file.But i got same issue during my file attachments. Here i shared my file attachment link.By using that link , you can get it definitely.But one small correction Here i have attached first.jar file instead of the test.jar .

    Pls go through following link,

    https://app.box.com/s/0u5aplpmur34cdl00ncd

    Thanks .

  • Hi Suresh,

    I have tried your jar file and got X server issue that we need X server support in filesystem to run the jar file.

    Unfortunately I don't have X server support on my filesystem.

    May be you can try the attached patch for the issue and let me know the results.

    Untar the attachment in java lib folder.

    8508.java_lib.tar.gz

  • Hi Titusrathinaraj Stalin,

      Thanks for your useful attachments.very nice.But unfortunately right now also it is not working .That means it is asking another file  libX11.so.6: cannot open shared object file: No such file or directory .  Here i have attached my screen shot.Please can you attach me this library file. And also give me information about  how to get this files.

    Thanks

  • Hi Suresh,

    I will attach the X11 library now, hereafter if you face any issues comes regarding X libraries, please try to use all the X server libraries in your filesystem.

    5554.lib_java.tar.gz

  • Hi Suresh,

    Please update us once you got fixed your problem,

    Let me know if any issues.

  • Hi Titusrathinaraj Stalin,

    Thank you for reply.But unfortunately i got again following error message with searching another file.

    libXrender.so.1: cannot open shared object file: No such file or directory

    I think  they missed X library files where i bought from my board.So i confused more. I have searched on the net .Finally i got rpm files gcc-4.1.0-glibc-2.3.2-EP93XX-0.2-a.i386.rpm  from the net.But i could't install it . 

    I put it following commands in linux terminal,  

    rpm -ivh gcc-4.1.0-glibc-2.3.2-EP93XX-0.2-a.i386.rpm

    But it rpm not found error.I think i don't know what i do next.

    I have to ask one important questions.Without Ubuntu can able to run JAVA application with GUI supported

    If you are having better ideas, please give me.

  • Hi Suresh,

    Please use the following link to download the rpm package for armv7 for appropriate X server libraries and extract and put into your filesystem.

    I have provided the X libraries by doing the above steps.

    http://rpmfind.net/linux/rpm2html/search.php?query=libX11.so.6

  • Hi Titusrathinaraj Stalin,

    Exactly that is correct. I also downloaded from the link.Last mail i have attached one rpm package which i have downloaded from that link also.But right now my problem is ,my linux doesn't support rpm command .Already i given that error in our last chat .Please check it .

  • Hi Suresh,

    Download the rpm library and don't try to install in ARM platform by doing "rpm -ivf xxx.rpm" .

    Just copy into Linux ubuntu machine and do extract the packages (you will get "Extract Here" option when you press the right click of rpm package)  then you will get "usrr/lib" folder with required X libraries.

  • Hi Titusrathinaraj Stalin,

     

    "   Just copy into Linux ubuntu machine and do extract the packages (you will get "Extract Here" option when you press the right click of rpm package) "

     

    Thanks.You are telling ubuntu machine is desktop.Am i correct?. But unfortunately i don't have it. I am having windows desktop only.But Sure i will do it.But in case you haven't mentioned ubuntu desktop in your previous chat means , let me know . Thanks .

  • Hi Suresh,

    I meant Linux ubuntu desktop host machine.

  • Hi Titusrathinaraj Stalin,

    I will do it.But right now i couldn't connect with the server.That means server issue. I will download and install it later.

    Thanks. 

  • Hi Titusrathinaraj Stalin,

     Yesterday we got it output.We installed MySQL application also.I am so happy.Right now i can able to run JAVA application in my board without any problems. Actually the problem is that first they were giving basic root file.So can't run my java GUI.After that they gave Ubuntu basic root file(it doesn't have any icons and application like that.Only command terminal is there). But that terminal window is very useful  for me.Because i don't to need to

    run other application.And also thank you so much.Because your information regarding to java application (headless vs headful).Finally i got clear idea to finish my product.So thank you so much and also for your team.Here i have attached few sample snaps.My ubuntu is having command terminal window only without icons.

    1.I can't calibarte my touch screen .Is there any option in ubuntu .

    2.I am new for embedded linux .So please can you give some materials for embedded linux and embedded ubuntu .

    Thanking you..

  • Hi Sures,,

    Sounds good.

    Thanks for your update.

    Typically we use "ts_calibrate" to calibrate touch screen devices.

  • Hi Titusrathinaraj Stalin,

    Thanks .. I thing this is one my best discussion.