Home » Language IDEs » Java Development Tools (JDT) » Java Eclipse console not working [SOLVED (false alarm)]
Java Eclipse console not working [SOLVED (false alarm)] [message #870813] |
Wed, 09 May 2012 18:46 |
Hanz Gunz Messages: 8 Registered: April 2012 |
Junior Member |
|
|
Alrite this one's a major bug so that's an alert to all those who use it, beware:
the bug is simple actually: the console doesn't work
but first off, the specs:
dual core CPU (old), 2 GB RAM running WinXP
file downloaded was a zip file, 128Mb (unzipped: 156Mb)
(I tried another version before, slightly bigger file but can't remmber the size, same bug)
I'm kinda new to Java (did a 2 month crash course, we used something called Notepad++ and it was perfect & easy to use, unfortunately the company I'm gonna work for likes to complicate things so they're using Eclipse, so I've to learn how this stuff works rather soon)
now this is a serious bug cause even simple programs don't work
I tried Hello World program, here's the screencaps:
before running:
img802.imageshack.us/img802/47/fore.jpg
after running (run as java application):
img715.imageshack.us/img715/2148/afth.jpg
=> a console is "created" but stays blank, NO OUTPUT
I tried right-click+run on different things in the left menu (on helloworld.java, on helloworld, on main(string[]) etc. ), same result (none)
btw this is a really serious bug as it makes the entire thing useless so this alert outa be passed around on other java forums
ps. apparently this is a really new bug cause even google can't help
[Updated on: Sun, 13 May 2012 22:38] Report message to a moderator
|
|
| | | | | | |
Re: /!\ WARNING /!\ CRITICAL bug in Eclipse Java IDE [message #871053 is a reply to message #871024] |
Thu, 10 May 2012 16:41 |
Hanz Gunz Messages: 8 Registered: April 2012 |
Junior Member |
|
|
Paul Webster wrote on Thu, 10 May 2012 10:45You're code works for me. After you run, does anything show up if you right-click in the console window and "Select All"?
PW
nope console stays blank, just a blinking cursor
btw my code works too - in DOS shell. so this is an eclipse bug
unless there's another eclipse version that works? (there's lot of files to download on eclipse site so it aint easy to know which one's the right one)
[Updated on: Thu, 10 May 2012 16:41] Report message to a moderator
|
|
| | |
Re: /!\ WARNING /!\ CRITICAL bug in Eclipse Java IDE [message #871369 is a reply to message #871101] |
Sat, 12 May 2012 15:03 |
Stephan Herrmann Messages: 1853 Registered: July 2009 |
Senior Member |
|
|
Hanz,
sure if Eclipse wouldn't be able to run a Hello-World Java program that would be really bad.
Apparently it works for many many people, and the question here is, what makes your case different.
The first thing that comes to my mind: what operating system / windowing system do you use?
Next: which exact Java runtime do you use.
Some information can be retrieved using the debug perspective:
after running your program, find a line starting with "<terminated, exit value.." in the Debug view:
- what exit value is shown?
- when you open right-click "Properties" on that line, what is the exact Command Line: shown?
Is that the same command you typed at the DOS prompt?
If Eclipse failed to launch your program perhaps an error was logged in the "Error Log" view.
Finally, as you mention your company forcing you to use Eclipse: I'm sure there are lots of folks who can spot the issue by looking at your machine, much easier than if we are guessing remotely what might have happened. If it turns out to be an Eclipse bug, we do appreciate a bug report as Paul mentioned, but for that we need more information than just the fact that it doesn't work.
HTH,
Stephan
|
|
|
Re: /!\ WARNING /!\ CRITICAL bug in Eclipse Java IDE [message #871402 is a reply to message #871369] |
Sun, 13 May 2012 11:32 |
Hanz Gunz Messages: 8 Registered: April 2012 |
Junior Member |
|
|
thx 4 the help
but it's not "my company" YET atm I'm still @ home on my personal PC so I'm my own
anyway to answer the questions:
Stephan Herrmann wrote on Sat, 12 May 2012 11:03
The first thing that comes to my mind: what operating system / windowing system do you use? Windows XP, sp3
Quote:Next: which exact Java runtime do you use. I'm not even sure what a java runtime is - is that what they call java virtual machine? the java.exe file? or javac.exe? or that thing they call JDK? (whatever it is)
in Control Panel Add/Remove Programs there are 2 lines that say Java(TM) 7 Update 1 and Java(TM) SE Development Kit Update 1
Quote:Some information can be retrieved using the debug perspective:
after running your program, find a line starting with "<terminated, exit value.." in the Debug view:
- what exit value is shown? it says
<terminated>helloworld [Java Application]
<terminated, exit value: 0>C:\Program Files\Java\jre7\bin\javaw.exe (13 may 2012 13:15:06)
(having done some C before I suppose an exit value of 0 means "no error" which means it says everything is working fine...which it obviously aint )
Quote:- when you open right-click "Properties" on that line, what is the exact Command Line: shown?
C:\Program Files\Java\jre7\bin\javaw.exe" -Dfile.encoding=Cp1252 -classpath C:\workspace\bonjourmonde\bin helloworld
('bonjourmonde' is the name of the "project" cause I had to give it a name, gave it a different name from the 'helloworld' class itself so as not to get confused...I'm not sure what the hell "project" is but I suspect it's only an Eclipse thing, not something intrinsic to java language. I never used projects when I was doing java in notepad+DOS mode)
Quote:
Is that the same command you typed at the DOS prompt? nope in DOS I don't use the javaw.exe file, instead I used javac.exe & java.exe
first I type javac helloworld.java (this creates a class file)
then I type java helloworld (this runs the prog & shows the output)
Quote:If Eclipse failed to launch your program perhaps an error was logged in the "Error Log" view.
apparently Eclipse does launch it, it's just the console that wont work :/
anyway
when I open Eclipse (before runing any prog) it says :
Failed to retrieve default libraries for C:\Program Files\Java\jre7
org.eclipse.epp.package.java.product
and if I right-click & copy the message it apparently puts something much longer in the clipboard:
eclipse.buildId=M20120208-0800
java.version=1.7.0_01
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product
Error
Sun May 13 13:27:52 CEST 2012
running the prog however doesn't create any xtra error messages
[Updated on: Sun, 13 May 2012 11:36] Report message to a moderator
|
|
|
Re: /!\ WARNING /!\ CRITICAL bug in Eclipse Java IDE [message #871413 is a reply to message #871402] |
Sun, 13 May 2012 14:12 |
Stephan Herrmann Messages: 1853 Registered: July 2009 |
Senior Member |
|
|
Hanz Gunz wrote on Sun, 13 May 2012 13:32 it's not "my company" YET atm I'm still @ home on my personal PC so I'm my own
Hanz, I mean no offense, but given your lack of knowledge about IDEs in general and Eclipse in particular, you might be better off clearly mentioning to your future employer that you need some training in this field. If you feel you can work better with notepad++ than with an IDE this is something your company needs to know, IMHO.
Your specifications look pretty normal, except that Windows XP + Java 7 might be an unusual combination of old and new. Actually your screenshots didn't look like Windows XP to me, but I may be wrong here.
Hanz Gunz wrote on Sun, 13 May 2012 13:32in Control Panel Add/Remove Programs there are 2 lines that say Java(TM) 7 Update 1 and Java(TM) SE Development Kit Update 1
It seems you have two Java installations: a JRE (runtime only) and a JDK (development) installation.
Hanz Gunz wrote on Sun, 13 May 2012 13:32it says
<terminated>helloworld [Java Application]
<terminated, exit value: 0>C:\Program Files\Java\jre7\bin\javaw.exe (13 may 2012 13:15:06)
So Eclipse is using the JRE installation.
Hanz Gunz wrote on Sun, 13 May 2012 13:32in DOS I don't use the javaw.exe file, instead I used javac.exe & java.exe
javac is not part of the JRE so here you must be using the other Java install.
So this is a difference between your DOS-prompt experiments and Eclipse.
It should be worth an experiment to use the JDK for Eclipse, too.
Hanz Gunz wrote on Sun, 13 May 2012 13:32when I open Eclipse (before runing any prog) it says :
Failed to retrieve default libraries for C:\Program Files\Java\jre7
org.eclipse.epp.package.java.product
Interesting, looks like https://bugs.eclipse.org/bugs/show_bug.cgi?id=267384
Supposedly, this message is harmless, but I don't know.
If you think this is a Console-only problem, why don't you debug into the program to see if it is executing properly?
best,
Stephan
|
|
| |
Re: /!\ WARNING /!\ CRITICAL bug in Eclipse Java IDE [message #871442 is a reply to message #871439] |
Sun, 13 May 2012 19:26 |
Stephan Herrmann Messages: 1853 Registered: July 2009 |
Senior Member |
|
|
Hanz Gunz wrote on Sun, 13 May 2012 20:09
so could xp+java7 combo be the problem?
Just a guess: XP is quite old, whereas java7 is the latest.
Hanz Gunz wrote on Sun, 13 May 2012 20:09IO could try a windows 2003+eclipse test
I don't think Java7 is supported on Windows Server 2003.
Hanz Gunz wrote on Sun, 13 May 2012 20:09I suppose you mean click on the green bug icon instead of the green arrow (run) icon
when I do that I get an error it says
"launching helloworld has encountered a problem
cannot find a free socket (whatever that is) for the debugger"
OK, so there is a problem launching Java applications in debug mode. It doesn't look like that machine isn't in a very healthy state.
Other than that, sorry, that's a bit too many questions for me to answer. Not sure if other members of this forum want to chime in. I suggest you find a local friend who already uses Eclipse to have a look at your machine.
best,
Stephan
PS: Next time before you raise a major-bug-alarm, please make sure you know exactly what you are doing.
|
|
| | |
Goto Forum:
Current Time: Wed Sep 25 07:24:37 GMT 2024
Powered by FUDForum. Page generated in 0.04969 seconds
|