LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-27-2004, 08:43 AM   #1
Giles
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Rep: Reputation: 0
Java GUI via command line sessions?


RH Enterprise Linux AS release 3
Kernel 2.4.21-15.0.2.ELsmp i686

We have students who use this server for Java programming classes.
They connect to the server via telnet.
They write their programs using text editors, compile using 'javac' and execute their programs using 'java'.
One problem that is being encountered is if they execute a program that is supposed to display labels, buttons, textfields or anything GUI related, the program will throw the following exception;

"Exception in thread "main" java.lang.InternalError: Can't connect to X11 window using ':0.0' as the value of the DISPLAY variable."


If the same program was executed in a terminal window at the console it would work as programmed.

My question is- how can the students get their GUI java apps to execute and display properly when connected to the server remotely?

Thanks!
-Giles
 
Old 09-27-2004, 11:04 AM   #2
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Rep: Reputation: 47
it can't be done the way you want it to be. when you connect via telnet all you get is the telnet terminal. with ssh you can use X11 forwording to make any gui apps display on the connecting machine, however that requires and X server (gui environment) to be running on the connecting machine. if you students use linux there is no problem they simply ssh serverIP
export DISPLAY="theirIP:0.0"
run the application.

if they use windows they have but one option. install cygwin and launch it's X server and ssh client.

I personaly have done all of this on my home systems.

I am a programming student, I took 3 java classes, we learned on windows at school, however I used linux, because fo java's cross platform ability I could develop on linux and it would run fine onthe instructors windows machine, and vice versa is true. you should have your students install the java VM on there windows boxes and upload there finished progrm to the server for grading.

as I stated before there is no easy way to do what you want. installing cygwin can be more difficult then installing linux. and I doubt most of your students use linux.
 
Old 09-28-2004, 09:03 AM   #3
Giles
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks exodist.
Yes, the students are using WXP. I will look into cygwin.

Thanks again!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
command line and GUI kpachopoulos Linux - Newbie 3 08-22-2004 09:13 AM
Multiple telnet sessions from the command line Armethous Linux - Newbie 4 02-13-2004 04:07 PM
Command line to GUI Jon84 Slackware 34 03-12-2003 08:54 PM
gui vs. command line sdfjk Linux - Newbie 1 10-05-2002 03:59 PM
Command Line vs GUI Poorman Linux - General 27 07-11-2002 12:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:39 PM.

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