# help installing java



## hounddowg1 (Jul 19, 2011)

Ok, I downloaded the linux version of java, it was the self-extracting binary, and I tried to run it. I ended up getting this error:

```
SIRIUS# ./jre-6u26-linux-i586.bin
Unpacking...
Checksumming...
Extracting...
ELF binary type "0" not known.
./install.sfx.39694: 1: Syntax error: "(" unexpected
Failed to extract the files.  Please refer to the Troubleshooting section of
the Installation Instructions on the download page for more information.
```

Can anyone please tell me if I am doing something wrong? Thanks in advance.


----------



## fonz (Jul 19, 2011)

hounddowg1 said:
			
		

> ELF binary type "0" not known.



Does this help: `# brandelf -t Linux jre-6u26-linux-i586.bin`

Fonz


----------



## hounddowg1 (Jul 19, 2011)

I tried that. I got this:

```
SIRIUS# brandelf -t Linux jre-6u26-linux-i586.bin
brandelf: file 'jre-6u26-linux-i586.bin' is not ELF format
```


----------



## wblock@ (Jul 19, 2011)

hounddowg1 said:
			
		

> Ok, I downloaded the linux version of java, it was the self-extracting binary, and I tried to run it.
> ...
> Can anyone please tell me if I am doing something wrong? Thanks in advance.



The first line and the last line are kind of cause and effect.  If you insist on trying to run a Linux binary Java installer, at least try running it with sh(1) or maybe bash(1).  Or within a chroot(8) of /compat/linux.

java/diablo-jre16 is likely going to be more effective.


----------



## hounddowg1 (Jul 19, 2011)

Alright, I tried installing the diablo port, and then it told me to go to the website and accept the license, so I did, and then it downloaded the package to my computer. Where should I go from there? Hang on, I will look for instructions.


----------



## hounddowg1 (Jul 19, 2011)

No instructions  Would somebody please help me out and tell me how to install it? I am kinda new to BSD.


----------



## fonz (Jul 19, 2011)

If you downloaded the FreeBSD version of Diablo, put it in /usr/ports/distfiles, go to /usr/ports/java/diablo-something-or-other and `# make install`. If you still run into problems, just holler. I've installed Diablo several times on several FreeBSD machines and although it can sometimes be a bit of a PITA it should work.

Fonz


----------



## hounddowg1 (Jul 19, 2011)

Do I extract it first?


----------



## fonz (Jul 19, 2011)

hounddowg1 said:
			
		

> Do I extract it first?


Nope. Just place the tarball into the /usr/ports/distfiles directory. Then make(1) should do the rest.

Fonz


----------



## hounddowg1 (Jul 19, 2011)

```
SIRIUS# cd /usr/ports/java/diablo-jre16 && make install clean
cd /usr/ports/java/diablo-jre16 && make config;


     â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
     â”‚              Options for diablo-jre 1.6.0.07.02_11                 â”‚  
     â”‚ â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â” â”‚  
     â”‚ â”‚   [X] POLICY    Install the Unlimited Strength Policy Files    â”‚ â”‚  
     â”‚ â”‚   [ ] TZUPDATE  Update the time zone data                      â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”‚ â”‚                                                                â”‚ â”‚  
     â”œâ”€â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜â”€â”¤  
     â”‚                          OK         [Cancel]                       â”‚  
     â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜  
                                                                             
===> Options unchanged
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE

 Because of licensing restrictions, you must fetch the distribution
 manually.

 Please open http://java.sun.com/javase/downloads/index.jsp
 in a web browser and follow the "Download" link for
 "JDK US DST Timezone Update Tool - 1_3_34" to obtain the
 time zone update file, tzupdater-1_3_34-2010o.zip.

 Please place the downloaded file(s) in /usr/ports/distfiles.

*** Error code 1

Stop in /usr/ports/java/diablo-jre16.
*** Error code 1

Stop in /usr/ports/java/diablo-jre16.
```


----------



## hounddowg1 (Jul 19, 2011)

This time, I got this:

```
===> Options unchanged
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE

 Because of licensing restrictions, you must fetch the distribution
 manually.

 Please open http://java.sun.com/javase/downloads/index.jsp
 in a web browser and follow the "Download" link for
 "JDK US DST Timezone Update Tool - 1_3_34" to obtain the
 time zone update file, tzupdater-1_3_34-2010o.zip.

 Please place the downloaded file(s) in /usr/ports/distfiles.

*** Error code 1

Stop in /usr/ports/java/diablo-jre16.
*** Error code 1

Stop in /usr/ports/java/diablo-jre16.
```


----------



## phoenix (Jul 19, 2011)

It's a heck of a lot simpler to just go to the FreeBSD Foundation Java page, download the binary package for *Diablo Caffe JDK 1.6.0-7*, and then use pkg_add(1) to install the package.  Bing, bang, boom, Java installed without compiling anything.  

The 7.x package runs fine on FreeBSD 8.x with the GENERIC kernel, as that includes all the backward compatibility shims needed.  You will have to install the misc/compat7x port, though.

Once the Java package is installed, you can install the java/openjdk6 port.  No licenses needed, no manual downloads, etc.  It will use the installed diablo JDK port to compile the OpenJDK port.  There's an option in the OpenJDK port to include the browser plugin, which I'm guessing is what you are after.


----------



## hounddowg1 (Jul 19, 2011)

Can I install it using the Sysinstall program?


----------



## wblock@ (Jul 19, 2011)

phoenix said:
			
		

> There's an option in the OpenJDK port to include the browser plugin, which I'm guessing is what you are after.



That was split out into java/icedtea-web last week.

But you're right, we really should ask what OP was trying to accomplish.


----------



## wblock@ (Jul 19, 2011)

hounddowg1 said:
			
		

> Can I install it using the Sysinstall program?



No.  Please read this: Installing Applications: Packages and Ports


----------



## fonz (Jul 19, 2011)

hounddowg1 said:
			
		

> Can I install it using the Sysinstall program?


Nope. That's exactly why you need to download the distfiles by hand. It has to do with licensing. I know that it's a bit of a bother, but that's the way it was when Sun were still alive and things haven't changed since Oracle came in.

In short: go to the relevant directory in /usr/ports/java/diablo-jre_something_, run *make install* to see where to get the files, place those in /usr/ports/distfiles, run make install again in the directory mentioned earlier and everything should be ok.

Fonz


----------

