Changeset 1237:bf4e13ea3f44
- Timestamp:
- 06/14/10 14:54:29 (3 years ago)
- Author:
- Thomas Gambet <tgambet@…>
- Branch:
- default
- Message:
-
tries to guess unicorn.home only if not set in the jvm
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1221
|
r1237
|
|
| 126 | 126 | |
| 127 | 127 | public static void initCore() throws InitializationFailedException { |
| 128 | | try { |
| 129 | | URL classesDir = Framework.class.getResource("/"); |
| 130 | | File classes = new File(classesDir.toURI()); |
| 131 | | File webInf = new File(classes.getParent()); |
| 132 | | System.setProperty("unicorn.home", webInf.getParent()); |
| 133 | | } catch (URISyntaxException e) { |
| 134 | | throw new InitializationFailedException(e.getMessage(), e); |
| | 128 | if (System.getProperty("unicorn.home") == null) { |
| | 129 | try { |
| | 130 | URL classesDir = Framework.class.getResource("/"); |
| | 131 | File classes = new File(classesDir.toURI()); |
| | 132 | File webInf = new File(classes.getParent()); |
| | 133 | System.setProperty("unicorn.home", webInf.getParent()); |
| | 134 | } catch (URISyntaxException e) { |
| | 135 | throw new InitializationFailedException(e.getMessage(), e); |
| | 136 | } |
| 135 | 137 | } |
| 136 | 138 | |