New to Kotlin - problems exporting to a runnable JAR

kotlin · · 267 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I have a project in Eclipse that was exporting fine before adding the Kotlin nature. I can build and run everything without issues from Eclipse, but when I try to export to a runnable JAR (regardless of which configuration I try), I get the following empty error message:</p> <p><a href="https://imgur.com/a/r4YS9" rel="nofollow">https://imgur.com/a/r4YS9</a></p> <p>Nothing on the console, no logs that could provide any clues of what&#39;s going on. Has anyone run into this issue before? Do you have any tips to offer? I&#39;m running out of ideas here... maybe there&#39;s a particular set of arguments I should provide to the run configuration for this project? (doesn&#39;t seem to be needed to run/debug it from Eclipse).</p> <hr/>**评论:**<br/><br/>flaghacker_: <pre><p>Would it be possible to switch to a real build system like gradle? I personally have no eclipse experience, so I can&#39;t really help there.</p></pre>littleodie914: <pre><p>+1 for switching to Gradle and letting Eclipse build through that. Gives you IDE independence, and deployment reproducibility is no longer an human error-prone concern. :-)</p></pre>enricom: <pre><p>What is the difference between &#34;Extract required libraries into generated JAR&#34; and &#34;Package required libraries into generated JAR&#34;?</p> <p>The main difference between a pure java and kotlin project is that the kotlin project will have a dependency on the kotlin runtime (and the stdlib most likely). It obviously won&#39;t run without its dependencies, so you need to make sure those are included in the final jar.</p></pre>
267 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet