|Re: [virgo-dev] Rationale for the Virgo launcher|
Please try http://hsiliev.dnsalias.com/virgo/dmk.sh
I adapted the script in the clean part and made some changes. It’s working on my Gentoo, but let’s see how it behaves on Mac J
I didn't have much luck on Mac OS X:
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available (implies -server, only for x86_64)
-client to select the "client" VM
-server to select the "server" VM
-jvm is a synonym for the "client" VM [deprecated]
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
set a system property
enable verbose output
-version print product version and exit
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
load native agent library by full pathname
load Java programming language agent, see java.lang.instrument
show splash screen with specified image
/Users/glynnormington/downloads/v/bin/dmk.sh: line 174: -Dosgi.framework.activeThreadType=normal: command not found
/Users/glynnormington/downloads/v/bin/dmk.sh: line 176: -Dorg.eclipse.virgo.kernel.config=/Users/glynnormington/downloads/v/config: No such file or directory
/Users/glynnormington/downloads/v/bin/dmk.sh: line 180: -jar: command not found
/Users/glynnormington/downloads/v/bin/dmk.sh: line 181: -install: command not found
/Users/glynnormington/downloads/v/bin/dmk.sh: line 182: -data: command not found
/Users/glynnormington/downloads/v/bin/dmk.sh: line 183: -configuration: command not found
/Users/glynnormington/downloads/v/bin/dmk.sh: line 184: -noExit: command not found
On 5 Jan 2011, at 09:00, Iliev, Hristo wrote:
Yesterday I managed to move the repository to the same folder as the rest of the JARs and we can now go for P2 publishing and installation of Virgo. You can find the prototype here:
However I also found that the parameters are passed to the user region, but of course they are also passed to the kernel region since –D is used. In this way the osgi.console is picked by the kernel region as it’s the first one in the startup order J I guess we should think of a way to bring back the launcher functionality to pass parameters to the user region.
The known problems/limitations for this prototype:
1. Equinox extension hook is working but on every startup in the log there is:
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.Class.forName0(Native Method)
2. NPEs for all services on shutdown:
3. Passing parameters (system properties….) to the user region
4. Launcher is not used but still needed because of usage of ArgumentParser class
Ok. I'm glad that works. Thanks.
On 4 Jan 2011, at 13:53, Iliev, Hristo wrote:
The parameters work ok. The command:
startup.bat “-Dosgi.console=2401” (“=” is separator in windows)
provides the same functionality as before. I had to refactor a bit the dmk.bat script to put the system properties before equinox launcher’s –jar, but now everything is ok. Thanks for the hint J
I think we have to merge our prototypes anyway and me and Borislav will use only one branch. I’m currently working with head, but we should also check if there are problems to merge all changes since we’ve made several small changes so far.
I missed the most important piece! I should have said "the launch sequence *under Eclipse* is quite delicate". You should try running those tests as JUnit tests *under Eclipse*. Sorry.
On 31 Dec 2010, at 10:54, Glyn Normington wrote:
One other thing to check is that integration tests still run as the launch sequence is quite delicate. Try StandardKernelIntegrationTest for starters and then something more ambitious like NestedPlanIntegrationTests.
On 31 Dec 2010, at 08:29, Glyn Normington wrote:
That approach seems good except for the change to replace -F with -D which impacts externally visible function. For instance, it is currently possible to run with the Equinox console without having to change the configuration by invoking:
Is there a way to preserve this function, e.g. by enhancing the Equinox launcher? If not, we'll have to document the incompatibility carefully in 2.1->3.0 migration notes.
Please note also that we need to manage potential conflicts carefully. I presume you and Borislav are working on a branch or branches. I am still in the process of doing radical restructuring in and around the org.eclipse.virgo.kernel.osgi.region package on the branch bug330776-framework-hooks branch which are likely to conflict with your changes, especially relating to the user region, so you should take care to do the appropriate merging before merging into master to ensure that all tests continue to pass on master. I can advise on that when you are closer to completion, depending on whether my branch has merged into master by then.
On 30 Dec 2010, at 21:22, Hristo Iliev wrote:
I was not able to run the existing tests, since I had problems with running them on Windows :), but it seems that Virgo is starting ok and the web console is working. What I've done so far was to:
I think that the first 3 point in the list above correspond almost 1:1 to the launcher's rationale you described:
While the first problem can be solved by simply refactoring the code to allow the use of the launcher as bundle, the second one is not that easy.
On 30 December 2010 11:56, Glyn Normington <gnormington@xxxxxxxxxx> wrote:
At the recent Virgo F2F we discussed the possibility of replacing the Virgo launcher with the standard Equinox launcher.