By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,779 Members | 1,078 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,779 IT Pros & Developers. It's quick & easy.

Problems in displaying swing Frames on some windows 2000 machines

P: n/a
DL
Hello,

I am teaching a java course. When some of my students tried
to run a very simple java program that displays a JFrame, it
appeared that even though the program was compiled OK
on all machines in the lab (running windows 2000), a couple of
the machines did not display the Frame at all.

There wasn't any error message printed in the console window
where we started the program. They just didn't display the frame.
(even though most of the machines running the same program
did display the frame correctly).

Do you have any suggestion in how to trace and resolve such
a problem.

Thank you,

D.
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Liz
jdb

"DL" <di******@cs.umb.edu> wrote in message
news:4b**************************@posting.google.c om...
Hello,

I am teaching a java course. When some of my students tried
to run a very simple java program that displays a JFrame, it
appeared that even though the program was compiled OK
on all machines in the lab (running windows 2000), a couple of
the machines did not display the Frame at all.

There wasn't any error message printed in the console window
where we started the program. They just didn't display the frame.
(even though most of the machines running the same program
did display the frame correctly).

Do you have any suggestion in how to trace and resolve such
a problem.

Thank you,

D.

Jul 17 '05 #2

P: n/a
DL wrote:
Hello,

I am teaching a java course. When some of my students tried
to run a very simple java program that displays a JFrame, it
appeared that even though the program was compiled OK
on all machines in the lab (running windows 2000), a couple of
the machines did not display the Frame at all.

There wasn't any error message printed in the console window
where we started the program. They just didn't display the frame.
(even though most of the machines running the same program
did display the frame correctly).

Do you have any suggestion in how to trace and resolve such
a problem.


Hmm, the classic "works on my machine" problem.

First, determine that the problem does not lie with the code created on
those machines. Copy the class files from a known working machine and
attempt to run them.

Next, the issue is likely environmental. Use the "env" command to
determine the environments on each machine. Pay attention in particular
to the PATH and the CLASSPATH. Also, determine which version of java is
in use on each machine. Try giving the full path to java.exe on the
machines that do not work.

Failing that, start printing out things within the code, or if you
prefer, use a debugger. Unfortunately the debugger will require
enviromental changes that may mask the issue.

Ray
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.