element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum swing application error on BBB
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 28 replies
  • Subscribers 483 subscribers
  • Views 3066 views
  • Users 0 members are here
Related

swing application error on BBB

ramanc51
ramanc51 over 10 years ago

Hi all

          I am getting following error while i run my java swing app through linux script, but no error while executing by java -jar myapp.jar on shell, is there any clue to resolve this error

 

java.awt.eventqueue3.run

java.security.accesscontroller.doPrevilidged(native method)

java.security.protectiondomain$javasecurityaccessimpl.dointersection

java.awt.eventqueue.dispatchevent

  • Sign in to reply
  • Cancel

Top Replies

  • clem57
    clem57 over 10 years ago +1
    What is your linux script source?
  • clem57
    clem57 over 10 years ago in reply to ramanc51 +1
    ramanc51 Key message is HeadlessException (Java Platform SE 6) and No X11 DISPLAY variable was set, but this program performed an operati...s it. This means you need X windows environment properly set…
  • mconners
    mconners over 10 years ago in reply to ramanc51 +1
    The one who owns the display is the user that is logged in. You are starting a service as one of the system users, I'm not sure which one, because I don't have access to your system. X11 will prevent users…
Parents
  • clem57
    clem57 over 10 years ago

    What is your linux script source?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • ramanc51
    ramanc51 over 10 years ago in reply to clem57

    i saved my script in /usr/bin/myscript.sh

     

    #!/bin/bash

    java - jar /home/debian/myapp.jar

     

    trying to execute from my myapp.service that saved on /usr/lib/systemd/system and symliked to /etc/systemd/system

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ramanc51
    ramanc51 over 10 years ago in reply to clem57

    Thank you Clem, issue is solved by the first link reference, this issue is solved by adding following lines in my  myscript.sh

     

    export DISPLAY=:0.0

     

    cd /home/debian    // my myapp.jar is  here

     

    su - debian  -c ´java -jar myapp.jar´

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ramanc51
    ramanc51 over 10 years ago in reply to mconners

    Thank you Mike, your guldens was useful to know actual error that i am facing, as you said export DISPLAY is must to run my app.jar without x11 error, finally i found the user own the display by Clem reference then issue is resolved.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • clem57
    clem57 over 10 years ago in reply to ramanc51

    Great news! Please share your project here when you get the chance!

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ramanc51
    ramanc51 over 10 years ago in reply to clem57

    sure, but on later i share my project, i need on more guide i want to load my usb-serial converter with specified name that given below, i created my 81-usb-serial.rules in /etc/udev/rules.d, but this rules is not loaded, it always load ttyUSB0/1 or ttyUSB1/0

     

    SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{serial}=="DJJHDH", SYMLINK+="USB-RS232"

    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A6008isP", SYMLINK+="USB-RS422"

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 10 years ago in reply to ramanc51

    Raman Arumugam wrote:

     

    su - debian  -c ´java -jar myapp.jar´

    Duh. Of course, I can't believe I did't think of that image. I guess I was too focused on the X issues. Glad you got it sorted out.

     

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • clem57
    clem57 over 10 years ago in reply to ramanc51

    OMG! ramanc51

         imagePlease do not change because this area is related to driver code that which expects names to be in a known form. Linux is a beast allowing tons of things to change, Even though it can, you must be a developer knowing what source does to change it.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 10 years ago in reply to clem57

    clem57 , It seems like adding the symlink attribute should be OK.

     

    Refer to this guide and search for symlink

    Writing udev rules

    "

    KERNEL=="hdc", SYMLINK+="cdrom cdrom0"

    The above rule is probably more typical of the types of rules you might be writing. It creates two symbolic links at /dev/cdrom and /dev/cdrom0, both of which point at /dev/hdc. Again, no NAME assignment was specified, so the default kernel name (hdc) is used."

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 10 years ago in reply to ramanc51

    ramanc51 Since this is a different issue, it should probably be moved into a new thread. That helps people find it in the future.

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ramanc51
    ramanc51 over 10 years ago in reply to mconners

    OK, i posted on separate thread as udev rules error on BBB with more details

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ramanc51
    ramanc51 over 10 years ago in reply to mconners

    Hi mike

                  i tried with different parameter on my rule but no luck, i got error while test my device /dev/ttyUSB0 using udevadm test  /dev/ttyUSB0 as follows

     

    unable to open device /sys/dev/ttyUSB0, but no file like ttyUSB on /sys/dev folder.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • ramanc51
    ramanc51 over 10 years ago in reply to mconners

    Hi mike

                  i tried with different parameter on my rule but no luck, i got error while test my device /dev/ttyUSB0 using udevadm test  /dev/ttyUSB0 as follows

     

    unable to open device /sys/dev/ttyUSB0, but no file like ttyUSB on /sys/dev folder.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube