4

I have a RCP application, inside which I have added some System.out.println() statements. Now, that I have exported the project as a product, can anyone please tell me where to look for these System.out.println() output?

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79
Srijani Ghosh
  • 3,935
  • 7
  • 37
  • 68

1 Answers1

2

Since you are not using the logger framework, the output is not printed into the default workspace/.metadata/.log file.

You can start your product with a console though, adding the following parameters to the ProductName.ini (e.g. Eclipse.ini) file in your installation directory:
-console
-consoleLog

The ini file should look something like this:

-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
-console
-consoleLog

The output will be printed in the console window.

EDIT
If you get an error message after starting the application:
could not find bundle: org.eclipse.equinox.console

You need to add the following bundles to your ProductName.product file ('Contents' tab) and export a new product: org.eclipse.equinox.console
org.apache.felix.gogo.runtime
org.apache.felix.gogo.command
org.apache.felix.gogo.shell

flavio.donze
  • 7,432
  • 9
  • 58
  • 91
  • Thanks for the reply. Now a console window is opening, but, there is some exception. could not find bundle: org.eclipse.equinox.console. – Srijani Ghosh Jan 27 '16 at 10:02
  • add the "org.eclipse.equinox.console" plugin to your product configuration. You will also need the dependent "org.apache.felix.gogo.runtime" plugin. – flavio.donze Jan 27 '16 at 10:29
  • 2
    No in your `.product` file, you will have to create a new product. And I forgot you also need the following two bundles: "org.apache.felix.gogo.command" and "org.apache.felix.gogo.shell" – flavio.donze Jan 27 '16 at 10:51
  • Sorry for the late reply. Probably my question is silly. But, I am not able to find the .product in the exported RCP application, can you please help me? :( – Srijani Ghosh Jan 27 '16 at 14:18
  • I am sorry.. I am bit confused. can you please explain a little mroe? – Srijani Ghosh Jan 27 '16 at 14:22
  • Great! Just for the record, the .product file is in your development environment. From where you generate the actual RCP product. So it is not in your exported RCP application but somewhere in the IDE in a plugin/feature project. – flavio.donze Jan 27 '16 at 14:58