<p>Here are the news:</p>
<ul>
<li>
<p>Remove the windows hack and so the need to use sun.* (ie cherry pick what was done on bitcoinj master upstream).</p>
<ul>
<li>I tested that and it fails. I get:</li>
<li>
<pre><code>   java.io.IOException: Failed to delete chain file in preparation for restore.
   at bisq.core.btc.setup.WalletConfig.startUp(WalletConfig.java:417)
   at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
   at com.google.common.util.concurrent.Callables$4.run(Callables.java:122)
   at java.base/java.lang.Thread.run(Thread.java:844)```
</code></pre>
</li>
<li>Apparently the windows hack is still needed. I wrote a unit test to prove the windows hack is still needed and posted a comment on the upstream issue <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="270864771" data-permission-text="Issue title is private" data-url="https://github.com/bitcoinj/bitcoinj/issues/1477" data-hovercard-type="issue" data-hovercard-url="/bitcoinj/bitcoinj/issues/1477/hovercard?comment_id=450274821&comment_type=issue_comment" href="https://github.com/bitcoinj/bitcoinj/issues/1477#issuecomment-450274821">bitcoinj#1477 (comment)</a></li>
</ul>
</li>
<li>
<p>use openjdk10 for bitcoinj</p>
<ul>
<li>I tried it and I found a lot of problems and had to make several "hacks" to make it work...</li>
<li>target 1.6 conflicted with code added to bitcoinj by bisq.
<ul>
<li>PeerAddress uses InetSocketAddress.getHostString() which is anotated as <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=1189235" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/SInCE">@SInCE</a> 1.7.</li>
<li>I don't know why this works when building using oraclejdk8.</li>
<li>I had to update core/pom.xml and update maven-compiler-plugin source and target to 1.7</li>
</ul>
</li>
<li>intellij can not find most or all javafx.* packages so it does not compile
<ul>
<li>I deleted wallettemplate project</li>
</ul>
</li>
<li>maven javadoc plugin fails, so I can not build the jar
<ul>
<li>Error fetching URL: <a href="http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/" rel="nofollow">http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/</a></li>
<li>core/pom.xml : I had to remove the reference to <a href="http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/" rel="nofollow">http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/</a></li>
</ul>
</li>
</ul>
</li>
<li>
<p>Then I moved to WindowsMMapHack</p>
<ul>
<li>I tried to add a copy of the sun.* classes to bitcoinj: I got an error on intellij telling me I can not add sun.* classes because they were part of the java.base module.</li>
<li>So I decided to update WindowsMMapHack instead: <code>jdk.internal.ref.Cleaner cleaner = ((sun.nio.ch.DirectBuffer) buffer).cleaner();</code></li>
<li>It compiles using maven and does not shows red marks on intellij.</li>
<li>But building the project on intellij still fails... it complains it can not find jdk.internal.ref nor sun.nio.ch on the build log.</li>
<li>Since I could build it with maven, I moved on.</li>
<li>I tried that with bisq and I get the same error I used to get before the fix: OverlappingFileLockException</li>
</ul>
</li>
</ul>
<p>So...</p>
<p>What to do next?</p>
<ul>
<li>Find out the exact classes that openjdk10 uses in WindowsMMapHack and try to tune it to make it work.</li>
<li>Wait for responses to <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="270864771" data-permission-text="Issue title is private" data-url="https://github.com/bitcoinj/bitcoinj/issues/1477" data-hovercard-type="issue" data-hovercard-url="/bitcoinj/bitcoinj/issues/1477/hovercard?comment_id=450274821&comment_type=issue_comment" href="https://github.com/bitcoinj/bitcoinj/issues/1477#issuecomment-450274821">bitcoinj#1477 (comment)</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bitcoinj/issues/17#issuecomment-450284875">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZtoMMNse9ZvP6Xv-0FDAmQSY8iiXSks5u9ZbEgaJpZM4ZYg2L">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZtg3LjxSd4m88ouBPVIfbRnK8LGiHks5u9ZbEgaJpZM4ZYg2L.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bitcoinj","title":"bisq-network/bitcoinj","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bitcoinj"}},"updates":{"snippets":[{"icon":"PERSON","message":"@oscarguindzberg in #17: Here are the news:\r\n\r\n- Remove the windows hack and so the need to use sun.* (ie cherry pick what was done on bitcoinj master upstream). \r\n  - I tested that and it fails. I get:\r\n  - ``` \r\n       java.io.IOException: Failed to delete chain file in preparation for restore.\r\n       at bisq.core.btc.setup.WalletConfig.startUp(WalletConfig.java:417)\r\n       at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)\r\n       at com.google.common.util.concurrent.Callables$4.run(Callables.java:122)\r\n       at java.base/java.lang.Thread.run(Thread.java:844)```\r\n  - Apparently the windows hack is still needed. I wrote a unit test to prove the windows hack is still needed and posted a comment on the upstream issue https://github.com/bitcoinj/bitcoinj/issues/1477#issuecomment-450274821\r\n\r\n\r\n- use openjdk10 for bitcoinj\r\n  - I tried it and I found a lot of problems and had to make several \"hacks\" to make it work...\r\n  - target 1.6 conflicted with code added to bitcoinj by bisq.\r\n    - PeerAddress uses InetSocketAddress.getHostString() which is anotated as @since 1.7.   \r\n    - I don't know why this works when building using oraclejdk8.\r\n    - I had to update core/pom.xml and update maven-compiler-plugin source and target to 1.7  \r\n  - intellij can not find most or all javafx.* packages so it does not compile\r\n    - I deleted wallettemplate project\r\n  - maven javadoc plugin fails, so I can not build the jar\r\n    - Error fetching URL: http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/\r\n    - core/pom.xml : I had to remove the reference to http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/\r\n\r\n- Then I moved to WindowsMMapHack\r\n  - I tried to add a copy of the sun.* classes to bitcoinj: I got an error on intellij telling me I can not add sun.* classes because they were part of the java.base module.\r\n  - So I decided to update WindowsMMapHack instead: `jdk.internal.ref.Cleaner cleaner = ((sun.nio.ch.DirectBuffer) buffer).cleaner();`\r\n  - It compiles using maven and does not shows red marks on intellij. \r\n  - But building the project on intellij still fails... it complains it can not find jdk.internal.ref nor sun.nio.ch on the build log.\r\n  - Since I could build it with maven, I moved on.\r\n  - I tried that with bisq and I get the same error I used to get before the fix: OverlappingFileLockException\r\n\r\n\r\nSo...\r\n\r\nWhat to do next?\r\n- Find out the exact classes that openjdk10 uses in WindowsMMapHack and try to tune it to make it work.\r\n- Wait for responses to https://github.com/bitcoinj/bitcoinj/issues/1477#issuecomment-450274821\r\n"}],"action":{"name":"View Issue","url":"https://github.com/bisq-network/bitcoinj/issues/17#issuecomment-450284875"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bitcoinj/issues/17#issuecomment-450284875",
"url": "https://github.com/bisq-network/bitcoinj/issues/17#issuecomment-450284875",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>