Hide Console log on Eclipse based RCP Application - eclipse

I have a eclipse based RCP application.While running it as a separate process we are getting console log which contains errors infos and exceptions.Is there any way to hide/avoid the console log by setting any configuration parameter in the config.ini file?

Run the application without the program argument -consoleLog (cf. Eclipse Help). This is usually set in the run configuration or product configuration.
Only by passing this argument should you get a console log at all. Note, however, that even if you don't specify this in your .product file, users may be able to "call" a console log by simply passing -consoleLog as an argument when running your application from the command line.
Also, I'm not sure whether third-party plugins or features would be able to activate the console log.

Related

Incorrect VM arguments in Tibco6.x Designer

I created a tibco 6.3 BW application using tibco designer on Windows.Application is running fine but whenever I try to add Vm arguments (under Arguments tab) in Run Configurations Menu they gets modified after I close the menu. I was trying to add debug arguments
-agentlib:jdwp=transport=dt_socket,server=y,address=9090,suspend=n
for debugging the application but they always gets modified so that some '=' sign changes into space. So whenever I edit vm args and try to run the application I get invalid arguments error.
I think the problem is similar to this https://superuser.com/questions/392230/incorrect-vm-arguments-in-myeclipse-run-configuration
Any help would be appreciated.
Although I don't know why it was happening, but I found a workaround by supplying vm arguments directly to jre, by going to preferences --> java --> Installed JREs --> Edit JRE --> Default Vm Arguments.

how to include run as configurations in exported eclipse product

I am exporting eclipse rcp application using "eclipse product export wizard". I want to redirect console logs into a file.
I am doing the below, which is working fine when I run as a eclipse application. It is not reflecting after export.
The Run configurations cover how to run something, i.e. they are the part external(ish)* to your application.
In particular, the Output File and Standard Input and Output settings are ways in the Eclipse development environment to handle redirects of the application.
A quick rundown would be to run the console application like this:
$ path/to/app -application com.example.yourname > file.log
If the shell you are using is Bash, there is a long bit in the manual with further options. Powershell and cmd on windows have similar options.
Of course, if you want your program to write to a file all the time (with a possible command line argument to specify file), you probably will want to code that yourself.
* The reason I put "ish" on external is that some of the settings, like Configuration and Plug-ins are part of what you export, but Arguments, Tracing and Environment are not.

Can a "run configuration" ensure another app is running?

When working with Mule ESB, we need to have (in our case) ActiveMQ running (in a terminal) or it won't work. That's fine, but I sometimes forget to start ActiveMQ, which caused me to wonder...
Can I somehow explain to my "Run configuration" that it should start an external program in conjunction with starting the run|debug session? And if so, can it be configured to only start it if it's not already running?
I am not sure whether you can run the external application using your project run configurations. But from mule studio you can start the external application using Run--> External tools. Refer the below kink for details
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-exttools-running.htm
Eclipse CDT contains a useful type of launch configuration called a Launch Group. With a launch group you can set up different launches to run and what order. You can optionally add delays between launches (to allow for your service to start) or wait for a set up launch to terminate before running the next one.
To install the launch groups you can add "C/C++ Development Tools" to your installation.
Once installed, you should have a new launch type called a launch group.
Here is an example of one that may address your first question:
Launch Group Example
As my example shows, you don't need to have any CDT launches to be able to use Launch Groups.
As for your second part. This is in active development. Eclipse EASE is adding full scriptability to Eclipse and as it turns out I have just written a post about adding launching capabilities to the scripting. You can follow that work on bugzilla: Bug 478397

Passing proxy settings to a bundled JRE install4j application?

We provided an application installed with install4j, with bundled JRE, to one of our customers. This customer needs some proxy settings configured manually for this application.
I tried to put deployment.config file in the JRE's lib directory but it didn't seem to change anything. I couldn't find a relevant vmoptions either.
Is there a way to pass these settings to the app/jre?
Is there also a way to instruct the JRE to open the Java console when it runs?
Thanks!
/Shmulik.
You can configure the proxy by setting the VM parameters
proxySet=true
proxyHost=...
proxyPort=...
and for authentication
proxyAuth=true
proxyAuthUser=...
proxyAuthPassword=...
You can set them either in a "Run script" in the startup node of the installer action by calling System.setProperty() for the properties or by passing them on the command line like this:
-DproxySet=true -DproxyHost=... etc
As for your second question (better to ask a separate question on stackoverflow)
Is there also a way to instruct the JRE to open the Java console when it runs?
I assume you mean a terminal window, which can be done by selecting the "Windows console executable" property of the installer. You cannot change this property on the command line because this sets a static flag in the binary format of the Windows executable furing compilation.
I created an installer for WINDOWS as well as for MAC. The
application is using an embedded JRE. While the application runs, it's not
able to detect the proxy settings of the network even the option in
the browser is set to be "Auto Detect". But when the proxy settings provided explicitly in the browser, it's able to detect the proxy settings.
Even the proxy settings are not detected when "LAN Settings->Use automatic configuration script" option is selected and points to the .pac file.
Any suggestion, how to provide the proxy settings with BUNDLED JRE and java program can detect those settings without make any further changes in each machine.

Building CDT projects from commandline

I'm having trouble running a CDT build from the command line when super user. I can run the following command as a regular user, but when I am super user eclipse tells me an error has occured and crashes.
eclipse -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild
I am well aware that this command is missing parameters, but even running this as a regular user won't crash eclipse, it simply complains about missing parameters. My question is, why is it having a problem running as super user.
The log file it generates is not much help and just tells me
!MESSAGE Application error
This is on a CentOS 5 machine.
Any help would be appreciated, thanks.
You're being a little sparse with details. What does "crashed" mean? Exactly what happens? Are you getting a dialog? If so, what does it say?
A wild guess is that Eclipse needs a display, and the DISPLAY variable is not set. I suspect that even the headless CDT builder needs a display.