ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The program I am trying to run is database maintenance program that uses Absolute layout in its database layout form.
I have added to my bash_profile : DISPLAY=:0.0 and exported it.
I tried : java -jar jfmu.jar
I got the following response.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window
server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java
:53)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:1
31)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:68)
at java.awt.Window.init(Window.java:270)
at java.awt.Window.<init>(Window.java:318)
at java.awt.Frame.<init>(Frame.java:419)
at java.awt.Frame.<init>(Frame.java:384)
at javax.swing.JFrame.<init>(JFrame.java:150)
at com.sdiretail.fmu.Cfmu.<init>(Cfmu.java:44)
at com.sdiretail.fmu.Cfmu.main(Cfmu.java:707)
It looks like it is trying to bring up an X11 window to display the form.
If you're trying to run the program as a different user
from the one who runs X you'll have to run
xhost +locahost
as the owner of the X session before running the
jar file.
Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/awte
xtra/AbsoluteLayout
at com.sdiretail.fmu.Cfmu.initComponents(Cfmu.java:143)
at com.sdiretail.fmu.Cfmu.<init>(Cfmu.java:46)
at com.sdiretail.fmu.Cfmu.main(Cfmu.java:707)
- You have to include all jars in the classpath
- Adding the $HOME/men4/jfmu/org/netbeans/lib/awtextra in your classpath doesn't mean java will look for the jars in that directory($HOME/men4/jfmu/org/netbeans/lib/awtextra) by itself.
Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/awte
xtra/AbsoluteLayout
at com.sdiretail.fmu.Cfmu.initComponents(Cfmu.java:143)
at com.sdiretail.fmu.Cfmu.<init>(Cfmu.java:46)
at com.sdiretail.fmu.Cfmu.main(Cfmu.java:707)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.