start pure-java solution

Former-commit-id: 9bbb7b926a
Former-commit-id: d0c7e337a6382f59e4ba48e2c01c675917825761
This commit is contained in:
idk
2022-10-23 17:25:34 -04:00
parent b558bb350e
commit b0469561f2
3 changed files with 9 additions and 4 deletions

5
gngr.sh Normal file
View File

@ -0,0 +1,5 @@
#! /usr/bin/env sh
rm lib/jars/gngr.jar
mkdir -p lib/jars/
wget -c -O lib/jars/gngr.jar https://github.com/gngrOrg/gngr/releases/download/v0.3.16/gngr-0.3.16.jar

View File

@ -17,6 +17,7 @@
<pathelement location="${jettylib}/jetty-xml.jar" />
<pathelement location="${jettylib}/commons-logging.jar" />
<pathelement location="${jettylib}/commons-el.jar" />
<pathelement location="lib/jars/gngr.jar" />
</path>
<target name="all" depends="clean, build" />

View File

@ -150,7 +150,6 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
if (line.startsWith(key)) {
String[] splitLine = line.split(" ");
kb.close();
logger.info("line "+ line);
String finalValue = splitLine[splitLine.length - 1].trim();
if (!finalValue.equals("")) {
return finalValue;
@ -217,12 +216,12 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
String defaultValue = registryQuery(hkeyquery, "(Default)");
if (defaultValue != null) {
if (!defaultValue.equals(""))
return defaultValue.split(" ")[0];
return defaultValue;
} else {
defaultValue = followUserConfiguredBrowserToCommand(hkeyquery);
if (defaultValue != null) {
if (!defaultValue.equals(""))
return defaultValue.split(" ")[0];
return defaultValue;
}
}
return null;
@ -278,7 +277,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
//
public ProcessBuilder baseProcessBuilder(String[] args) {
String browser = findUnsafeBrowserAnywhere();
String browser = findUnsafeBrowserAnywhere().split(" -")[0].trim();
if (browser == null)
System.exit(1);
if (browser.contains("edge.exe") || browser.contains("msedge.exe")){