FAQ Can I create an application that doesn't have a data location? - Revision historyhttp://wiki.eclipse.org/index.php?title=FAQ_Can_I_create_an_application_that_doesn%27t_have_a_data_location%3F&action=history
Revision history for this page on the wikienMediaWiki 1.23.2Sun, 02 Aug 2015 21:36:01 GMTClaffra at 20:51, 14 March 2006http://wiki.eclipse.org/index.php?title=FAQ_Can_I_create_an_application_that_doesn%27t_have_a_data_location%3F&diff=3323&oldid=prev
http://wiki.eclipse.org/index.php?title=FAQ_Can_I_create_an_application_that_doesn%27t_have_a_data_location%3F&diff=3323&oldid=prev<p></p>
<p><b>New page</b></p><div>''<br />
<br />
<br />
<br />
<br />
<br />
Yes you can, if you are very careful. In Eclipse 3.0, the base Eclipse runtime was designed<br />
to be able to run without any data location at all. If you have a carefully<br />
crafted RCP application, you might be able to get away with not having a data<br />
location. To launch an Eclipse application with no data location at all, use<br />
the special &lt;tt&gt;-data @none&lt;/tt&gt; command-line argument:<br />
&lt;pre&gt;<br />
eclipse -data @none -application your.app.id<br />
&lt;/pre&gt;<br />
If you do this, an error will occur if any plug-in attempts to access the<br />
platform instance location, including the plug-in metadata location.<br />
In other words, this configuration makes sense only for a tightly<br />
controlled application in which you are absolutely certain that the<br />
instance location will never be used. <br />
<br />
One advantage of this approach<br />
is that multiple instances of your application can run simultaneously without<br />
forcing the user to pick a different data location for each one. For most<br />
RCP applications, this type of configuration is too constrictive. A better<br />
approach for applications that don&amp;#146;t need to store any interesting state is<br />
to pick a random location in a scratch directory, such as<br />
the directory provided by &lt;tt&gt;System.getProperty(&quot;java.io.tmpdir&quot;)&lt;/tt&gt;. This will <br />
ensure that your application does not fail if a plug-in is installed that does want<br />
to access the instance location.<br />
<br />
<br />
== See Also: ==<br />
<br />
[[FAQ_How_do_I_specify_where_application_data_is_stored%3F]]<br />
<br />
&lt;hr&gt;&lt;font size=-2&gt;This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].&lt;/font&gt;</div>Tue, 14 Mar 2006 20:51:10 GMTClaffrahttp://wiki.eclipse.org/Talk:FAQ_Can_I_create_an_application_that_doesn%27t_have_a_data_location%3F