Config.ini file is having the property osgi.bundles which contains the list of plugins that needs to be started while launching my RCP. For Eg.:
osgi.bundles=reference\:file\:org.junit_4.8.2.v4_8_2_v20110321-1705/#4,reference\:file\:org.mortbay.jetty.server_6.1.23.v201012071420.jar#4,reference\:file\:org.mortbay.jetty.util_6.1.23.v201012071420.jar#4
Clarification :
I need to use the Java variables/Environment variables in the reference of the plugins. So that I can make my RCP more flexible. Please suggest a solution.
I need something like below:
osgi.bundles=reference\:file\:{ENV.USERDIR}/org.junit_4.8.2.v4_8_2_v20110321-1705/#4
Here when trying the load the bundles, JUNIT bundle should be loaded from the replaced from the environment variable USERDIR as.
c:/users/username/org.junit_4.8.2.v4_8_2_v20110321-1705
Any help is appreciated.
Thanks in advance,
Vikram
This is supported in org.eclipse.equinox.launcher_V1.3.0 or higher. You can use the environment variables like
$variable_name$/bundle-name.jar.
While parsing the config file, The launcher will substitute the value of the variable and start the bundle from the specified location.
Related
Is it possible to call and use the confi.ini file generated by RCP product in RCP plugin project ?
In the Configuration tab i've added two properies that i want to call and use in my RCP plugin project .
The two properties are an URL adress and a KEY. I've added them in the config.ini so when I export my RCP product and deploy it later, other users could modify the KEY or the URL.
I hope that my post is clear enough !
Thanks in advance.
Ismail
Properties you define in the config.ini can be accessed using the standard System.getProperty("property-name") call.
When you are testing an RCP in Eclipse using a Run Configuration you can either specify the property in the Arguments tab, VM arguments part, using the format:
-Dproperty=value
Or you can specify a config.ini template on the Configuration tab. In either case you still use System.getProperty to access the value.
This is not really an error but I'm trying to find out how to tell the GWT compiler to put the generated files in folder xx/yyinstead of the default ModuleName/ModulaName+Package that it currently puts them in
https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#DevGuideCompilerOptions
is not really of any help as can't see how to add the configuration parameters.
The -war option allows you to specify were the output files are generated. The directory name of the generated files in this directory is by default the package + module name. You can specify another name by setting this in your module .gwt.xml file: <module rename-to="somename"> where somename will be the name of the directory. The first reference of ModuleName in ModuleName/ModulaName+Package is the deployment name. The name is the url set in the GWT tab of you devmode debug configuration.
Hilbrand, Thanks but the issue I was having was how to pass the parameters to the GWT compiler when running it in eclipse. I didn't really explain it properly in my question.
Anyways for anyones who stumble on this question here is the solution
http://turbomanage.wordpress.com/2010/04/14/gwt-compiler-options/
Its in the advanced option when you launch the GWT Compile command in eclipse.
I need to put some property files (config file required by a library) in the starting path of the Jetty server in DevMode but could not figure out where to put them. Where should I put them?
I googled but no luck for that. Any help is appreciated.
You need to share your project set up information. Maven? Also mention whether property file is for app or jetty and what you are trying to achieve.
Also you can try putting up the properties file in web-inf/classes if it is project specific.
I am guessing you are not using any standard GWT project set up. It will be very difficult to proceed further even if you get this solved. I recommend you should go with gwt standard set up. You can reference GWT samples folder from here.
Use Hello project set up as template. If you are beginner also read up on https://developers.google.com/web-toolkit/doc/latest/RefCommandLineTools#webAppCreator.
If you use maven in your project, placing them in the src/main/resources should work.
Otherwise put it in your WEB-INF/classes
We have an application developed in NetBeans, based on the NetBeans platform. There's a 3'rd party program that we have a runtime dependency on, more specifically a jar in the other progams lib folder.
How should we include the other progam's jar in our classpath?
The recommendation from the other progam's manufacturer is to set environment variable CLASSPATH to include
C:\Progam Files\Other Program\lib\theJAR.jar
And if that's not possible, we should copy theJAR.jar to JRE-HOME\lib\ext
We must not copy theJAR.jar anywhere else, that might cause it to stop working...
Now NetBeans takes no notice of what's on environment variable CLASSPATH. Their recommended way seems to be to make a wrapper, but that would lead to copying the jar, unless there's some way to make a wrapper module that points to CLASSPATH?
At the moment we are copying the jar into JRE-HOME\lib\ext. But then there's unnecessary hassle when we install some java update.
Do you have any solution to this problem? It seems like something that might be simple, but I haven't found the right place to look yet...
Edit: The application is ant-based.
From the documentation for the Module System API's overview of the runtime infrastructure (bottom of the page under the section "Common Problems and Solutions"):
Q: Can my module add a library JAR to the classpath from outside the
IDE [read: platform] installation?...
A: Not easily. You have a few options:
Add an entry to ide.cfg [your app's .config file]. For example:
-cp:a c:\eak\lib\eak.jar This startup file provides the ability to add classpath entries to the IDE's Java invocation.
...
It goes on to list two more options. The second option is the same solution you've come up with. The third is to "partition your module and use a new classloader" which I can't recommend either way since I have no experience doing this (but it's worth a read).
Assuming that this first option is what you are looking for, you will need to add a custom .conf file to your project and point to it in your project.properties file, like so: app.conf=nbproject/my.conf. This will add your custom .conf file to your app's install directory instead of the default config file that is normally added. Of course, you'll need to add the -cp:a c:\eak\lib\eak.jar entry to this custom config file in order to load the .jar.
During development you'll need to add the following entry to the project.properties file: run.args.extra=-cp:a c:\eak\lib\eak.jar. This will pass the command line option to your debug instance.
You can add that .jar file by following the steps below:
In the left side panel named "Projects" open your project and right click on the "Libraries", then select "Add JAR/Folder...".
Then select your .jar file from the location where you have stored it in the next dialog box that opens and then press "Open".
Vola Finished!!! (with the same process you can add other libraries also like JavaCV, JMF,etc)
And Now You Can Use That .Jar File From Your Project Library.
Hope It Helps.
Is there way to tell IntelliJ IDEA which output folder to use for GWT compiler ? I know it copies artifacts to project folder but it doesn't copy extras which I set using "-extra" command line parameter of gwt compiler.
IntelliJ IDEA leaves it in USER_HOME/.IntelliJIdea10/system/gwt/project_name_with_hash/module_name_with_hash/compile/www
UPDATE: Strangely I didn't find list of possible path macroses on IntelliJ's website. But I found them in idea.jar. Possible macroses are:
APPLICATION_HOME_DIR
PROJECT_DIR
MODULE_DIR
USER_HOME
Have you tried constructing the path using ${PROJECT_DIR} path variable? That will resolve to the project location and then you can specify the rest of the path. Like ${PROJECT_DIR}/reports/extras. I haven't used IntelliJ for a few years, but I am pretty sure that's the path variable name.
EDIT: sorry built in path macros in IntelliJ are specified using $...$ syntax. So I think it should be $PROJECT_DIR$
There is no way to change output folder for GWT compiler in IDEA. However you can specify absolute path to any directory after '-extra' parameter.
By the way for what purpose do you use '-extra'?
As of November 18, 2011 it is impossible to use path macroses in settings of project modules. Jetbrain is aware of this and there is feature request in their JIRA.
My work-around for a team with multiple engineers for now is to use system TEMP folder for GWT compiler extra output and move files in post-build event to folder I want it to be at.