https://wiki.eclipse.org/index.php?title=FAQ_Can_I_create_an_application_that_doesn%27t_have_a_data_location%3F&feed=atom&action=historyFAQ Can I create an application that doesn't have a data location? - Revision history2024-03-28T21:47:40ZRevision history for this page on the wikiMediaWiki 1.26.4https://wiki.eclipse.org/index.php?title=FAQ_Can_I_create_an_application_that_doesn%27t_have_a_data_location%3F&diff=3323&oldid=prevClaffra at 20:51, 14 March 20062006-03-14T20:51:10Z<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 <tt>-data @none</tt> command-line argument:<br />
<pre><br />
eclipse -data @none -application your.app.id<br />
</pre><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&#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 <tt>System.getProperty("java.io.tmpdir")</tt>. 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 />
<hr><font size=-2>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].</font></div>Claffra