# Problem building htm.java (osx)

**URL:** <https://discourse.numenta.org/t/problem-building-htm-java-osx/2377>\
**Category:** HTM.Java\
**Tags:** builds\
**Created:** [June 2, 2017, 2:32pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377 "2017-06-02T14:32:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrea\_Giordano](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrea\_Giordano](https://discourse.numenta.org/u/Andrea_Giordano)\
**Post date:** [June 2, 2017, 2:32pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/1 "2017-06-02T14:32:20Z")

</div>

Hi guys, I’m trying to use htm.java to perform simple application.  
I’d like to execute some examples but I can’t complete building tutorial.

Here: [github htm.java](https://github.com/numenta/htm.java/wiki/Build-Instructions)

I’m at “build the docker image” step but when I enter this line:  
[htm.java]$ docker build -t $USER/htm.java .

console says: " invalid reference format: repository name must be lowercase"

How can I fix it?

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [June 2, 2017, 3:36pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/2 "2017-06-02T15:36:42Z")

</div>

It doesn’t look like you have a `$USER` environment variable set up in your OS. Are you on Windows? Quick fix is to simply change `$USER` to the absolute file path to `htm.java`.

---

<div class="post-metadata">

**Author:** ![Andrea\_Giordano](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrea\_Giordano](https://discourse.numenta.org/u/Andrea_Giordano)\
**Post date:** [June 2, 2017, 3:39pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/3 "2017-06-02T15:39:08Z")

</div>

> [@rhyolight](#):
>
> olute file pa

I’m on osx. I’ve also tried using absolute path instead of $USER but I have same effect

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [June 2, 2017, 3:44pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/4 "2017-06-02T15:44:02Z")

</div>

Does your username have upper case letters?

---

<div class="post-metadata">

**Author:** ![Andrea\_Giordano](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrea\_Giordano](https://discourse.numenta.org/u/Andrea_Giordano)\
**Post date:** [June 2, 2017, 4:07pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/5 "2017-06-02T16:07:16Z")

</div>

I’ve already tried to change my name without upper letters but issue remains.

My absolute path should be /Users/andrea/htm.java but I’m not sure I can change also “Users” folder name.

If I try with /Users/andrea/htm.java console says: `invalid reference format: repository name must be lowercase`

If I use $USER/htm.java instead: “docker build” requires exactly 1 argument(s).  
See ‘docker build --help’.

```
Usage: docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile
```

---

<div class="post-metadata">

**Author:** ![cogmission](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cogmission/32/11_2.png) [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Post date:** [June 2, 2017, 6:25pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/6 "2017-06-02T18:25:19Z")

</div>

Hi @Andrea_Giordano,

May I ask why your trying to build the docker file? The reason I ask is that it’s just a “reference” build so that users could see what a successful execution of:

`gradle -Pskipbench check`

…would look like if executed correctly. You can’t really do anything else with it…, and it is not part of the library one would use officially in their own code. Also, it’s probably very much out of sync now… not sure.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [June 2, 2017, 6:27pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/7 "2017-06-02T18:27:57Z")

</div>

David, maybe you should remove it from the README?

---

<div class="post-metadata">

**Author:** ![Andrea\_Giordano](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrea\_Giordano](https://discourse.numenta.org/u/Andrea_Giordano)\
**Post date:** [June 2, 2017, 6:28pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/8 "2017-06-02T18:28:38Z")

</div>

So I’ve done when I executed:  
gradle check

?

If yes, that command works correctly.

---

<div class="post-metadata">

**Author:** ![cogmission](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cogmission/32/11_2.png) [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Post date:** [June 2, 2017, 6:28pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/9 "2017-06-02T18:28:53Z")

</div>

Matt, you’re probably right…

---

<div class="post-metadata">

**Author:** ![cogmission](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cogmission/32/11_2.png) [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Post date:** [June 2, 2017, 6:30pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/10 "2017-06-02T18:30:08Z")

</div>

> [@Andrea\_Giordano](#):
>
> So I’ve done when I executed:  
> gradle check
> 
> ?
> 
> If yes, that command works correctly.

I’m not sure what this means? `gradle check` works? You should probably use

`gradle -Pskipbench check`

…because there’s no reason to run the benchmarks every time you build.

---

<div class="post-metadata">

**Author:** ![Andrea\_Giordano](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrea\_Giordano](https://discourse.numenta.org/u/Andrea_Giordano)\
**Post date:** [June 2, 2017, 6:35pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/11 "2017-06-02T18:35:07Z")

</div>

@cogmission ok thanks.  
I misunderstood, I though was necessary follow docker steps.

---

<div class="post-metadata">

**Author:** ![cogmission](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cogmission/32/11_2.png) [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Post date:** [June 2, 2017, 6:36pm UTC](https://discourse.numenta.org/t/problem-building-htm-java-osx/2377/12 "2017-06-02T18:36:58Z")

</div>

@Andrea_Giordano,

An easy mistake! 🙂

Using HTM.Java is much more simple than that. You just put it on your class path and that’s it! The other stuff is for setting up in Eclipse… I removed mention of the Dockerfile from the README… (@rhyolight @Andrea_Giordano)
