* Fix i2psnark dir when started from Windows no-wrapper (ticket #627)

This commit is contained in:
zzz
2012-04-20 13:44:41 +00:00
parent 79a7c14fdf
commit 112b88a7f9
5 changed files with 13 additions and 10 deletions

View File

@@ -101,7 +101,8 @@
<manifest>
<!-- top level installer will rename to jrobin.jar -->
<!-- DTG added in 0.8.4, not in the classpath for very old installs, before we changed wrapper.config to specify * -->
<attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar" />
<!-- very old installs don't have i2psnark,jstl,standard in the classpath... not added in WebAppConfiguration any more -->
<attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />

View File

@@ -68,13 +68,7 @@ public class WebAppConfiguration implements Configuration {
File dir = libDir;
String cp;
if (ctxPath.equals("/susidns")) {
// jars moved from the .war to lib/ in 0.7.12
cp = "jstl.jar,standard.jar";
} else if (ctxPath.equals("/i2psnark")) {
// duplicate classes removed from the .war in 0.7.12
cp = "i2psnark.jar";
} else if (pluginDir.exists()) {
if (pluginDir.exists()) {
File consoleDir = new File(pluginDir, "console");
Properties props = RouterConsoleRunner.webAppProperties(consoleDir.getAbsolutePath());
cp = props.getProperty(RouterConsoleRunner.PREFIX + appName + CLASSPATH);
@@ -101,6 +95,9 @@ public class WebAppConfiguration implements Configuration {
path = dir.getAbsolutePath() + '/' + elem;
// As of Jetty 6, we can't add dups to the class path, or
// else it screws up statics
// This is not a complete solution because the Windows no-wrapper classpath is set
// by the launchi2p.jar (i2p.exe) manifest and is not detected below.
// TODO: Add a classpath to the command line in i2pstandalone.xml?
File jfile = new File(path);
File jdir = jfile.getParentFile();
if (systemCP.contains(jfile.toURI().toURL()) ||