Hi,

Why is it mandatory that the launcher should be loaded from a jar file ?

I also faced the same problem while tryin the samples sometime back.
This could be fixed if you make your sample dependant on the jar file
rather than a project level dependancy.

Another question I had is, inside the launcher, can we return null
instead of throwing an IllegalStateException if launcher is not loaded
from a jar file ? ie to modify the code as :

        if (!"jar".equals(url.getProtocol())) {
        //throw new IllegalStateException("Must be run from a jar: " + url);
        return null;
        }

Regards,
jojo.


On 8/9/06, Jeremy Boynes <[EMAIL PROTECTED]> wrote:
The purpose of RuntimeInfo is to provide information about the runtime:
http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200607.mbox/%
[EMAIL PROTECTED]
and see the JavaDoc at
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/spi/src/
main/java/org/apache/tuscany/spi/services/info/RuntimeInfo.java

The extension mechanism uses this to locate the directory to scan but
that is a feature of the DirectoryScanExtender and not RuntimeInfo.

--
Jeremy

On Aug 8, 2006, at 5:12 PM, Raymond Feng wrote:

> Hi,
>
> If I run the Calculator test case inside Eclipse without setting
> the "tuscany.installDirectory" system property, I get the following
> exception.
>
> java.lang.IllegalStateException: Must be run from a jar: file:/C:/
> Tuscany/Apache/java/sca/core/target/classes/org/apache/tuscany/core/
> launcher/Launcher.class
> at org.apache.tuscany.core.launcher.Launcher.getInstallDirectory
> (Launcher.java:175)
> at org.apache.tuscany.core.launcher.Launcher.bootRuntime
> (Launcher.java:105)
> at org.apache.tuscany.test.SCATestCase.setUp(SCATestCase.java:52)
> at calculator.CalculatorTestCase.setUp(CalculatorTestCase.java:32)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run
> (JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run
> (TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> (RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> (RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
> (RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
> (RemoteTestRunner.java:196)
>
> Can we relax this constraint? I checked the references to
> RuntimeInfo.getInstallDirectory() and found out it's only used to
> deploy extensions. We also have a "TODO" in the code saying "do we
> want to support unpacked directories as extensions?".
>
> For the RuntimeInfo interface, is it designed to provide the
> install directory or a list of URLs representing extension SCDLs
> (by reading the code, this is how the interface is used today)? If
> it's the later case, I think we should have the following
> RuntimeInfo interface:
>
> public interface RuntimeInfo {
>    public List<URL> getInstalledExtensions();
> }
>
> Any thoughts?
>
> Thanks,
> Raymond
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Warm regards,
jojo.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to