LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2006, 03:01 AM   #1
jayn16
LQ Newbie
 
Registered: May 2006
Location: Pune, India
Distribution: Slackware 10.2
Posts: 15

Rep: Reputation: 0
X11 variable prob with Java on Slack 10.2


Java source code compiles with no problems.
But while running it (java filename), it gives error :
X11 DISPLAY variable not set.

I`ve used AWT in my Java program, using Slackware 10.2

P.S. PATH variable has also been set
 
Old 05-30-2006, 05:09 AM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Are you running X? If you are running it remotely, did you forward X or something?
 
Old 05-31-2006, 12:54 AM   #3
ppanyam
Member
 
Registered: Oct 2004
Location: India
Distribution: Redhat
Posts: 88

Rep: Reputation: 15
I assume you are running in an X environment. Then, if you are running it as a remote user (or by su to any other user..) make sure you have done
<code> xhost + </code>
on the local machine and then cahnge the DISPLAY environmental variable to local machine.

Soemthing like this

mymachine> xhost +
...
thatmachine> setenv DISPLAY mymachine:0.0

After that run your problem.

Panaym Prabhakar
 
Old 05-31-2006, 03:32 AM   #4
jayn16
LQ Newbie
 
Registered: May 2006
Location: Pune, India
Distribution: Slackware 10.2
Posts: 15

Original Poster
Rep: Reputation: 0
I`m running KDE. I`m not running it remotely.
However the program runs perfectly using netbeans 5.0.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. defa0009 Linux - General 15 02-18-2022 08:09 AM
Cannot connect to X11 window server using ":).0" as DISPLAY variable cclack Linux - Newbie 4 09-06-2007 09:32 PM
java variable redhatrosh Programming 6 03-17-2005 10:55 AM
how to concatenate variable name in Java ? black Programming 1 11-16-2004 04:08 AM
java and PATH variable qwijibow Linux - Newbie 1 05-26-2003 03:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration