Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 186216 - User must press Enter in Console view when launching RCP applications as Java Applicaiton
Summary: User must press Enter in Console view when launching RCP applications as Java...
Status: RESOLVED DUPLICATE of bug 40066
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-09 14:25 EDT by Martha Andrews CLA
Modified: 2007-05-11 14:59 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martha Andrews CLA 2007-05-09 14:25:04 EDT
Build ID: I20070503-1400

Steps To Reproduce:
1. Create a new Headless RCP Application (using File > New > Plug-in project dialog and choosing RCP Application and Unchecking "This plug-in will contribute to the UI", then choosing the "Hello World" example).
2. Launch the application using the link in the from plugin.xml editor to make sure it works.
3. Create a product configuration for the application.
4. Launch the product from the .product editor to make sure it works.
5. Add -console -consolelog to the launch configuration for the product and test again.
6. Create a new Java Application launch configuration for the product.  Set the classpath to include the org.eclipse.equinox.launcher_1.0.0v20070502.jar file. Set the main class to org.eclipse.equinox.launcher.Main. Set the program arguments to -console -consolelog -application <application name> , where <application name> is the name of the application.
7. Launch using the new configuration.  The console window shows "osgi>", but does not continue until the user presses the Enter key.


More information:
Launching from the IDE as an Eclipse Application works and launching from the command line with the java command works.  The hang is limited to launching as a Java application in the Eclipse IDE.
Comment 1 Thomas Watson CLA 2007-05-10 09:42:36 EDT
This is a dup of bug 40066.  But that bug is set to wontfix.  There is a workaround used when launching from PDE as an Eclipse Application.  You can set the following jvm argument to use the workaround when launching as a Java application from the IDE.


-Dosgi.console.blockOnReady=true

*** This bug has been marked as a duplicate of bug 40066 ***
Comment 2 Martha Andrews CLA 2007-05-10 20:18:36 EDT
Adding -Dosgi.console.blockOnReady=true to the program arguments did not work for me.  

Removing -console -consolelog from the program arguments did work, though.
Comment 3 Thomas Watson CLA 2007-05-11 08:57:46 EDT
You must add "-Dosgi.console.blockOnReady=true" to the VM arguments, not the Program arguments when running a Java application from Eclipse.
Comment 4 Martha Andrews CLA 2007-05-11 14:59:59 EDT
Yup, that works. Sorry I misread the workaround description earlier. Thanks.