unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar"
@ 2020-03-26  7:38 Pierre Neidhardt
  2020-03-26 10:22 ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre Neidhardt @ 2020-03-26  7:38 UTC (permalink / raw)
  To: 40234

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

Hi!

I'm trying to build https://github.com/hyperledger/iroha-java manually
with Gradle (tried with Guix but I'm stuck), and I get the following
error:

--8<---------------cut here---------------start------------->8---
Execution failed for task ':client:compileJava'.
Could not find tools.jar.
--8<---------------cut here---------------end--------------->8---

Then it suggests that the Java installation might be wrong.
I tried with icedtea 3.7.0, openjdk 9 and openjdk 12, to no avail.

Are our JDK packages wrong missing some jars?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar"
  2020-03-26  7:38 bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar" Pierre Neidhardt
@ 2020-03-26 10:22 ` Roel Janssen
  2020-03-26 11:41   ` Pierre Neidhardt
  2020-03-26 11:42   ` Pierre Neidhardt
  0 siblings, 2 replies; 8+ messages in thread
From: Roel Janssen @ 2020-03-26 10:22 UTC (permalink / raw)
  To: Pierre Neidhardt, 40234

On Thu, 2020-03-26 at 08:38 +0100, Pierre Neidhardt wrote:
> Hi!
> 
> I'm trying to build https://github.com/hyperledger/iroha-java manually
> with Gradle (tried with Guix but I'm stuck), and I get the following
> error:
> 
> --8<---------------cut here---------------start------------->8---
> Execution failed for task ':client:compileJava'.
> Could not find tools.jar.
> --8<---------------cut here---------------end--------------->8---
> 
> Then it suggests that the Java installation might be wrong.
> I tried with icedtea 3.7.0, openjdk 9 and openjdk 12, to no avail.
> 
> Are our JDK packages wrong missing some jars?
> 

The "tools.jar" is only in de icedtea:jdk output.
You might also need to set environment variable JAVA_HOME to the Guix profile
root that contains icedtea:jdk.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar"
  2020-03-26 10:22 ` Roel Janssen
@ 2020-03-26 11:41   ` Pierre Neidhardt
  2020-03-26 11:52     ` Roel Janssen
  2020-03-26 11:42   ` Pierre Neidhardt
  1 sibling, 1 reply; 8+ messages in thread
From: Pierre Neidhardt @ 2020-03-26 11:41 UTC (permalink / raw)
  To: Roel Janssen, 40234

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]

Roel Janssen <roel@gnu.org> writes:

> The "tools.jar" is only in de icedtea:jdk output.
> You might also need to set environment variable JAVA_HOME to the Guix profile
> root that contains icedtea:jdk.

Thanks, this is probably related!

However

--8<---------------cut here---------------start------------->8---
env JAVA_HOME=/home/ambrevar/.guix-extra-profiles/dev/dev ./gradlew jar
--8<---------------cut here---------------end--------------->8---

fails with the same error.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar"
  2020-03-26 10:22 ` Roel Janssen
  2020-03-26 11:41   ` Pierre Neidhardt
@ 2020-03-26 11:42   ` Pierre Neidhardt
  1 sibling, 0 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2020-03-26 11:42 UTC (permalink / raw)
  To: Roel Janssen, 40234

[-- Attachment #1: Type: text/plain, Size: 119 bytes --]

By the way, should JAVA_HOME be a native-search-path set by the JDKs?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar"
  2020-03-26 11:41   ` Pierre Neidhardt
@ 2020-03-26 11:52     ` Roel Janssen
  2020-03-26 12:46       ` Pierre Neidhardt
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2020-03-26 11:52 UTC (permalink / raw)
  To: Pierre Neidhardt, 40234

On Thu, 2020-03-26 at 12:41 +0100, Pierre Neidhardt wrote:
> Roel Janssen <roel@gnu.org> writes:
> 
> > The "tools.jar" is only in de icedtea:jdk output.
> > You might also need to set environment variable JAVA_HOME to the Guix
> > profile
> > root that contains icedtea:jdk.
> 
> Thanks, this is probably related!
> 
> However
> 
> --8<---------------cut here---------------start------------->8---
> env JAVA_HOME=/home/ambrevar/.guix-extra-profiles/dev/dev ./gradlew jar
> --8<---------------cut here---------------end--------------->8---
> 
> fails with the same error.
> 

Uh, I looked through one of my Java-related packages and found this snippet:

----------
;; Set JAVA_HOME to help maven find the JDK.
(setenv "JAVA_HOME" (string-append (assoc-ref inputs "icedtea")
                                   "/jre"))
----------

So perhaps JAVA_HOME needs to point to <profile-root>/jre.  (Sorry for the
previous suggestion..)

I'm not sure why I added this snippet though, but perhaps it's worth a try.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar"
  2020-03-26 11:52     ` Roel Janssen
@ 2020-03-26 12:46       ` Pierre Neidhardt
  2020-03-26 13:39         ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre Neidhardt @ 2020-03-26 12:46 UTC (permalink / raw)
  To: Roel Janssen, 40234

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

It worked!  Thanks a lot!

So what do you think of adding

(native-search-paths (list (search-path-specification
                                (variable "JAVA_HOME")
                                (files '("jre")))))

to icedtea-* and openjdk-*?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar"
  2020-03-26 12:46       ` Pierre Neidhardt
@ 2020-03-26 13:39         ` Roel Janssen
  2020-04-02  7:25           ` Pierre Neidhardt
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2020-03-26 13:39 UTC (permalink / raw)
  To: Pierre Neidhardt, 40234

On Thu, 2020-03-26 at 13:46 +0100, Pierre Neidhardt wrote:
> It worked!  Thanks a lot!
> 
> So what do you think of adding
> 
> (native-search-paths (list (search-path-specification
>                                 (variable "JAVA_HOME")
>                                 (files '("jre")))))
> 
> to icedtea-* and openjdk-*?
> 

I'm not sure if JAVA_HOME is only needed to build things (so only for the JDK),
or whether it's also useful for JRE.

I agree that it would be good to set when the JDK variant is installed.

Kind regards,
Roel Janssen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar"
  2020-03-26 13:39         ` Roel Janssen
@ 2020-04-02  7:25           ` Pierre Neidhardt
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2020-04-02  7:25 UTC (permalink / raw)
  To: Roel Janssen, 40234; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

Roel Janssen <roel@gnu.org> writes:

>> So what do you think of adding
>> 
>> (native-search-paths (list (search-path-specification
>>                                 (variable "JAVA_HOME")
>>                                 (files '("jre")))))
>> 
>> to icedtea-* and openjdk-*?
>> 
>
> I'm not sure if JAVA_HOME is only needed to build things (so only for the JDK),
> or whether it's also useful for JRE.
>
> I agree that it would be good to set when the JDK variant is installed.

Is it possible to set the search-path only for a given output?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-02  7:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26  7:38 bug#40234: [java-iroha] Gradle fails with "Could not find tools.jar" Pierre Neidhardt
2020-03-26 10:22 ` Roel Janssen
2020-03-26 11:41   ` Pierre Neidhardt
2020-03-26 11:52     ` Roel Janssen
2020-03-26 12:46       ` Pierre Neidhardt
2020-03-26 13:39         ` Roel Janssen
2020-04-02  7:25           ` Pierre Neidhardt
2020-03-26 11:42   ` Pierre Neidhardt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).