# Unable find Java JDK downloadable binaries (new to FreeBSD)



## memsize (Jan 16, 2012)

I have just installed FreeBSD 9.0 on amd64. All went well. I have been able to find and install many additional packages using *pkg_add -r*. I am still unable to find the Java JDK 1.6. I read that "diablo-jdk" is a pre-built binary package which name I found in the ports. The pkg_add command fails as the tarball is not found.

I browsed the ftp site and there is nothing that looks even close to what I am looking for.


```
pkg_add -r diablo-jdk-1.6.0.07.02_18
Error: Unable to get [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/Latest/diablo-jdk-1.6.0.07.02_18.tbz:[/url] File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/Latest/diablo-jdk-1.6.0.07.02_18.tbz'
 by URL
```

There is one "diablo" package but it is a usenet reader or something. Hours of googling did not help.


----------



## phoenix (Jan 16, 2012)

```
# cd /usr/ports/java/diablo-jdk16
# make install
```
Read the directions listed there, then go to the website listed and download the package.  Then install that package using `# pkg_add /path/to/downloaded/package.tbz`


----------



## memsize (Jan 16, 2012)

I was not able to install the jdk as a "package", but rather as a "distfile" according to instructions. I had to workaround the fact that the tzupdater tarball is now 1.3.45-20011n as show in:
http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2011-December/224490.html

Thanks


----------



## achix (Jan 18, 2012)

memsize, running diablo on 9.0 is just suicidal, and means only looking for trouble. 
http://www.freebsdfoundation.org/downloads/java.shtml

[CMD="portmaster"]/usr/ports/java/openjdk6[/CMD] and off you go!


----------



## SirDice (Jan 18, 2012)

Note that you require java/diablo-jdk16 to be able to build java/openjdk6.


----------



## bigearsbilly (Jan 18, 2012)

I had another post and I followed achix advice. I just did a make install in java/openjdk6. It went cleanly with no manual intervention, though I have been struggling lately and still have: /usr/ports/distfiles/tzupdater-1_3_45-2011n.zip and a few others, even though I did a *make distclean*. So I don't know if they helped on that score.

(I spent yesterday messing about with various java ports etc.)

Probably a good idea to update your ports tree first.
[CMD=]port fetch update[/CMD]
before you even think of starting.


----------



## achix (Jan 18, 2012)

SirDice said:
			
		

> Note that you require java/diablo-jdk16 to be able to build java/openjdk6.



Any of the : (an older) openjdk6, jdk1.6.0, diablo-jdk1.6.0 can bootstrap (a newer) openjdk6.


----------



## numpad5 (Jan 18, 2012)

On FreeBSD 8.2 I use oracle linux jre/jdk for nonweb apps (like Art Of Illusion for example), you just need linux compat with linprocfs and linsysfs if I remember correctly the way I installed it, download the linux jre/jdk you want from oracle and run the .bin file so that it extracts after chmod +x, for some reason the sunjdk installer in ports wasn't extracting rt.jar at the time, because of a license disclaimer check Y/N choice or something in the installer, but just downloading and running makes it work most of the time.  I haven't tried this with any web java apps but I imagine it should work with linux firefox too (I'm running firefox 8 still and might check on my 8.2 system later)


----------



## halplus (Jan 19, 2012)

Deploying java in Freebsd FreeBSD has always been a nightmare. All of my computers have it installed and I always need to refresh the steps, agree to the license and manually download source packages here and there. I think that is taking away users from the FreeBSD world alone. I think would be great if in the future this process is made easier maybe jumping into classpath/apache harmony [seems to be dead as http://harmony.apache.org/  ] or something like that.


----------



## achix (Jan 19, 2012)

halplus said:
			
		

> Deploying java in Freebsd has always being a nightmare. All of my computers have it installed and I always need to refresh the steps agree to the license and manually download source packages here and there. I think that is taking away users from the FreeBSD world alone.



It's been years since this is no longer the case.


----------



## halplus (Jan 20, 2012)

> It's been years since this is no longer the case.



Not for me. Like 15 days ago I deployed a brand new 8.2 and even had to Google for some dependencies that I found in some russian server untrusted by me (hope the build scripts checked at least some hash) and deploy also the source packages in some folder in the ports system. Then I was able to have diablo jdk working after building all of that. A nigthmare to have just a tomcat up and running. I could not find any prebuilt source packages. I remember the documentaiton to install prebuilt binaries pointed to a missing link somewhere at freebsdfoundation or something.


----------



## fonz (Jan 21, 2012)

achix said:
			
		

> It's been years since this is no longer the case.


It was still the case with 8.2-RELEASE and that hasn't been around for years.

Fonz


----------



## achix (Jan 30, 2012)

fonz said:
			
		

> It was still the case with 8.2-RELEASE and that hasn't been around for years.
> 
> Fonz



Anyone ever bothered to notice that there is a *precompiled* openjdk binary for 8 here: ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/java/openjdk6-b24_3.tbz

the respective 8.2-RELEASE is here : ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.2-release/java/openjdk6-b20_7.tbz

So there is NO bootstrap dependency. One can use a precompiled openjdk to build a newer one.


----------



## achix (Jan 30, 2012)

halplus said:
			
		

> Not for me. Like 15 days ago I deployed a brand new 8.2 and even had to Google for some dependencies that I found in some russian server untrusted by me (hope the build scripts checked at least some hash) and deploy also the source packages in some folder in the ports system. Then I was able to have diablo jdk working after building all of that. A nigthmare to have just a tomcat up and running. I could not find any prebuilt source packages. I remember the documentaiton to install prebuilt binaries pointed to a missing link somewhere at freebsdfoundation or something.



God created all humans, and therefore Russians and their servers. There is nothing special to fear about Russians servers, unless you consider nginx is evil. Nevertheless even this is not needed as per above.


----------

