help installing java

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:
Code:
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.
 
I tried that. I got this:
Code:
SIRIUS# brandelf -t Linux jre-6u26-linux-i586.bin
brandelf: file 'jre-6u26-linux-i586.bin' is not ELF format
 
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.
 
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.
 
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
 
Code:
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.
 
This time, I got this:
Code:
===> 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.
 
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 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-jresomething, 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
 
Back
Top