| Summary: | [launcher] Support for piping the output from the console | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Christophe Elek <celek> |
| Component: | Framework | Assignee: | equinox.framework-inbox <equinox.framework-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | aniefer, egalvez, jeffmcaffer, martin.gutschelhofer, pascal, rngadam |
| Version: | 3.2 | ||
| Target Milestone: | 3.3 M7 | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
| Bug Depends on: | 173962 | ||
| Bug Blocks: | |||
|
Description
Christophe Elek
The eclipse.exe uses the "javaw" executable from your JRE by default. The javaw exe does not pipe output. To do what you want you need to use the "java" executable. Try the following command (using the -vm option to specify the path to the java exe): eclipse -vm <path to jre bin>\java -debug -vmargs -Declipse.consoleLog=true > result.txt Morning Thomas,
Hmmmmmm
This is what I run
E:\eclipse32m6\eclipse>eclipse -vm jre\bin\java.exe -debug -vmargs -Declipse.consoleLog=true > result1.txt
This is what I see in the file
E:\eclipse32m6\eclipse>type result1.txt
Start VM: E:\eclipse32m6\eclipse\jre\bin\java.exe
-Declipse.consoleLog=true
-jar E:\eclipse32m6\eclipse\startup.jar
-os win32
-ws win32
-arch x86
-launcher E:\eclipse32m6\eclipse\eclipse.exe
-name Eclipse
-showsplash 600
-exitdata 1194_380
-vmargs
-Xms40m
-Xmx256m
-debug
-vm E:\eclipse32m6\eclipse\jre\bin\java.exe
-vmargs
-Declipse.consoleLog=true
-jar E:\eclipse32m6\eclipse\startup.jar
This is what I see in the console window that opens. I do not see that in the file..
Install location:
file:/e:/eclipse32m6/eclipse/
Configuration file:
file:/e:/eclipse32m6/eclipse/configuration/config.ini loaded
Configuration location:
file:/e:/eclipse32m6/eclipse/configuration/
Framework located:
file:/e:/eclipse32m6/eclipse/plugins/org.eclipse.osgi_3.2.0.v20060328.jar
Framework classpath:
file:/e:/eclipse32m6/eclipse/plugins/org.eclipse.osgi_3.2.0.v20060328.jar
Splash location:
e:\eclipse32m6\eclipse\plugins\org.eclipse.platform_3.2.0.v20060329\splash.b
mp
runCommand:
<E:\eclipse32m6\eclipse\eclipse.exe><-name><Eclipse><-showsplash><600><e:\ec
lipse32m6\eclipse\plugins\org.eclipse.platform_3.2.0.v20060329\splash.bmp>
Debug options:
file:/E:/eclipse32m6/eclipse/.options not found
Time to load bundles: 20
Opps. I forgot the eclipse.exe spawns a separate process which brings up another command prompt window. This prevents you from piping the output as well. You will have to bypass the eclipse.exe altogether. Just use the java command with the following from your eclipse installation directory: jre\bin\java.exe -jar startup.jar -debug -consoleLog > result1.txt Notice the use of -consoleLog instead of -Declipse.consoleLog=true Hmm, yeah.. that's the issue :( Ok, should I keep this one open as an enhancement ? So we can 'dump' the content into a file ? Is this the proper component ? It would be really useful if there was something I could change in the .options to be able to have the whole log in a file instead of copy/pasting the console output or launching eclipse myself as in comment #3. Can this be an RFE? Ricky: the log is already in a file: workspace/.metadata/.log. This bug is about piping standard output to a file. Since all shells have support for this already it seems like unnecessary work to add something like this... -debug is just used by plugin developers during development, and isn't intended for end-users anyway. John, -debug is heavily used by Support to trace the execution of a plugin The issue is that by bypassing the eclipse.exe we 1) *may* change the behavior 2) need to explain to a user: ok, do no click on the icon, instead open a command prompt window, go where eclipse is installed, now run.. java... no very friendlyThe problem with piping is on windows, it seems to run javaw from eclipse.exe instead of java, so the console is not really the one that is 'pipable' (sic) :) I also noticed that not all the info from -debug appear in the configuration/*.log file nor the .metadata/.log Maybe the proposal os Platform UI for a better message handler could be move to core ? :D Cheers Moving to where it belongs and cc Andrew who has been looking at the launcher. Yes, the JNI launching story would help here. As for comment 6, is this really true? Quite often when plugins handle debug mode they just use System.out. Is this somehow captured in the .log file? Starting in I20070430-0800, we now have an eclipsec.exe which is a console linked version of the launcher. Piping output works with this launcher when the vm is started with JNI (the default if no -vm argument is given). Verified, works like a charm :) I'd like to know if eclispec can be made to be used by a PDE product build as the exe? Imagine using PDE (headless) build for a product that is a console application; I'd like to use eclipsec in this case! Ah, I found my last comment already has a ticket: Bug 185207 |