Community
Participate
Working Groups
Investigate the creation of a console friendly eclipse.exe, which when started from within a console, would act like any other console app (redirect of in/out/err). On platforms where the libraries are linked against windowing system, a new set of library should be created unless we can dynamically load those.
*** Bug 179860 has been marked as a duplicate of this bug. ***
Investigate for M7
There are 2 ways to get a console friendlier eclipse.exe. 1) Compile eclipse.exe as a console application. This is a single line in the make file, and the OS will then take care of allocating the console. This is like the difference between java.exe and javaw.exe. We wouldn't want to ship this as the default exe since you always get a console. 2) Comments 4 & 5 on bug 167310 indicate we should be able to attach to an existing console when desired. This seems to be somewhat version (2000 vs XP) dependent, and results will likely depend on the VM being used.
(In reply to comment #3) > There are 2 ways to get a console friendlier eclipse.exe. > 1) Compile eclipse.exe as a console application. This is a single line in the > make file, and the OS will then take care of allocating the console. This is > like the difference between java.exe and javaw.exe. We wouldn't want to ship > this as the default exe since you always get a console. Would that in fact produce the right results? I haven't followed the launcher changes so I don't know how many processes we have. In the past capturing the output of eclipse.exe would not have been interesting, what we needed was to capture the output of the java process that it in turn launched. My primary goal is to have simple instructions for customers in the field to follow to collect trace output. Something along the lines of "drop this [debug options] file into the same directory as mybrandedeclipse.exe, and then run as 'mybrandedeclipse -debug debug.options > debug.out', and then send the resulting debug.out file to me." Right now the best we can do is tell them to edit mybrandedeclipse.ini to change the 'javaw' to 'java', and then manually copy the contents of the resulting console and paste to a file; but that is an awful solution, because usually the buffer overflows so data is lost, there are lots of extra line breaks, and users don't know how to copy from a console window.
Both (1) and (2) rely on the new behaviour that starts the vm in-process using the JNI invocation API so thatwe are only running 1 process. When the vm is started in a separate process (bug 168775) then you would have the same behaviour as before
*** Bug 169105 has been marked as a duplicate of this bug. ***
I have released changes so that the launcher will reuse the existing console when launched from a dos box (when -console, -consoleLog or -debug is specified). This only applies to XP and above. However, even with this change, the redirect is not working: eclipse -debug > out.txt I'm not sure what the problem is, but it is basically bug 167310 again. I can play with the output handles a bit and get the output from the launcher itself to redirect, but I haven't been able to redirect the java ouput. Note that compiling eclipse as a console application fixes all these problems.
*** Bug 93165 has been marked as a duplicate of this bug. ***
Starting in I20070430-0800, we now have an eclipsec.exe which is a console linked version of the launcher.
Andrew, can you summarize the instructions that we should give to users in the field in order to capture trace output, as mentioned in comment #4? Thanks.
You can droped a renamed eclipsec.exe: MyBrandedc.exe along with a MyBrandedc.ini. If no MyBrandedc.ini is found, the existing MyBranded.ini will be used. In that MyBrandedc.ini you can specify whatever debug options you need, like -debug -consoleLog Then they would launch with something like MyBrandedc > debug.out 2>&1 The 2>&1 is redirecting the stderr in addition to the stdout.
this should go on the wiki somewhere and in the various doc locations Perhaps we should have an explict doc bug for this so it does not get forgotten