Talk:Java
m (edit for readability) |
m (Reverted edits by 75.64.114.124 (Talk) to last revision by Jimbo) |
||
(29 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | This didn't help!! | + | ==This didn't help!!== |
I'm just trying to have simple java application run in mozilla or linux-mozilla (whichever works first) but the about plugins refuses to list java for some reason despite the symlink. I don't need the whole SDK. | I'm just trying to have simple java application run in mozilla or linux-mozilla (whichever works first) but the about plugins refuses to list java for some reason despite the symlink. I don't need the whole SDK. | ||
Line 13: | Line 13: | ||
[[User:Simon|relax]] | [[User:Simon|relax]] | ||
− | == to make a long story much shorter == | + | ==to make a long story much shorter== |
You need a working java compiler to compile java on a freebsd system. so the work around is to install the linux jdk, add the files that building java requires (in /usr/ports/distfiles -- all those files that the webpage says to install) and then go into /usr/ports/java/jre (or jdk14 or whatever) and build it. It takes a) a long time and b) a lot of diskspace. I understand that if you install the linux browser (instead of compiling mozilla/firefox from ports or using freebsd pkg) you can also use the linux java jre with it. | You need a working java compiler to compile java on a freebsd system. so the work around is to install the linux jdk, add the files that building java requires (in /usr/ports/distfiles -- all those files that the webpage says to install) and then go into /usr/ports/java/jre (or jdk14 or whatever) and build it. It takes a) a long time and b) a lot of diskspace. I understand that if you install the linux browser (instead of compiling mozilla/firefox from ports or using freebsd pkg) you can also use the linux java jre with it. | ||
Line 19: | Line 19: | ||
[[User:Dave|Dave]] | [[User:Dave|Dave]] | ||
− | === | + | ==...== |
Can you say that in terms of what the exact things to type are? | Can you say that in terms of what the exact things to type are? | ||
Line 139: | Line 139: | ||
P.S.: I'm using the 1.4.2_02 version, in theory, as the 1.4.2_06 compile simply dumps core without explanation of any kind. | P.S.: I'm using the 1.4.2_02 version, in theory, as the 1.4.2_06 compile simply dumps core without explanation of any kind. | ||
+ | |||
+ | == so wait == | ||
+ | |||
+ | which mozilla are you using? the linux-mozilla port or the native BSD? the ln -s between the JRE and the mozilla will only work if both are either native or both are linux ports. | ||
+ | |||
+ | from your description, what you did is what you're supposed to. ln -s <Java plugin.so PATH> <mozilla directory> | ||
+ | |||
+ | although....if you installed the linux-moz and you had the freebsd moz installed already, you may have copied the file to the wrong direcotry....find out where the linux mozilla port installed to -- could be /usr/local/somethingsomething/something ...you might be able to find out with [[pkg_info]]. | ||
+ | |||
+ | also, the diablo JDK does not install with pkg_add -- I was wrong about that. you need to download that to /usr/ports/distfiles and then go into /usr/ports/java/diablo-jdk (or whatever the dir is,) and do a make install there. (DO NOT UNTAR/UNZIP the tgz btw). let me know how that works out for you. | ||
+ | |||
+ | --[[User:Dave|Dave]] 20:04, 11 Jan 2005 (EST) | ||
+ | |||
+ | ==as i stated before....== | ||
+ | |||
+ | As I stated before, Diablo-jre-1.3.1.0 can't be pkg_add or pkg_delete or make install or make deinstall - in all cases I get errors saying it's installed - or not installed. The comment is listed as "???" in pkg_info. I'm not even sure diablo-jre is or isn't part of the install as jre-1.1.8 is installed to. Which JRE is the good one? | ||
+ | |||
+ | I've spend 34 hours already trying the possible permutations of that "ls -s <etc>" command and didn't find the right one - and I'm out of options (and yes I used rehash). Even if I had the right one how do I recognize it if there is still a bug or missing step somewhere?? | ||
+ | |||
+ | What I really, really need is a clean walkthru as I've now got 7 incomplete and unclear ones who contradict each other and the combinaisons of possibilities have all been tried - there must be a small step missing or the diablo problem is preventing java from working. | ||
+ | |||
+ | If I reach my 10th install from scratch to see if I can't get it right this time and still fail (currently: 8th) I'll simply have to let go of a nice job offer involving java beta testing ... *shudder* | ||
+ | |||
+ | == do not use pkg_add == | ||
+ | |||
+ | don't use the package tools to install diablo. | ||
+ | |||
+ | how to install diablo-jre: | ||
+ | |||
+ | # download the diablo .tgz or .tbz | ||
+ | # mv it to /usr/ports/distfiles | ||
+ | # cd into /usr/ports/java/diablo-jre | ||
+ | # make install | ||
+ | |||
+ | --[[User:Dave|Dave]] 11:40, 12 Jan 2005 (EST) | ||
+ | |||
+ | --- | ||
+ | |||
+ | As I stated before, Diablo-jre-1.3.1.0 can't make install or make deinstall. | ||
+ | |||
+ | To be more specific: | ||
+ | |||
+ | Result for make install: error message saying it's already installed. | ||
+ | |||
+ | Result for deinstall: Error message saying it's not installed. | ||
+ | |||
+ | I'm still clueless if Diablo is necessary or not to some or all install types, browser types, or if it's a linux-emulation thing, or whatever. What is Diablo? Do I really need it? | ||
+ | |||
+ | If it's not 100% mandatory, how do I install java without the badly-installed Diablo getting in the way of java working in the browser (if that's my problem)? | ||
+ | |||
+ | [[User:Simon|relax]] | ||
+ | |||
+ | == see also == | ||
+ | |||
+ | http://taosecurity.blogspot.com/2004_01_01_taosecurity_archive.html#107404060982021452 | ||
+ | |||
+ | ==Thanks, I'll try that next!== | ||
+ | Thanks, I'll try that next! | ||
+ | |||
+ | [[User:Simon|relax]] | ||
+ | |||
+ | == hosed up diablo install == | ||
+ | |||
+ | '''# cd /var/db/pkg''' | ||
+ | '''# ls -l | grep iablo''' | ||
+ | |||
+ | any hits? if you see "diablo-[version number]" in there, then | ||
+ | |||
+ | '''# rm -rf diablo-[version-number]''' | ||
+ | |||
+ | then | ||
+ | |||
+ | '''# pkgdb -F''' | ||
+ | |||
+ | and any ports which have diablo as a dependency, tell it to delete that dependency entirely. Then you can go back into the diablo port itself and try building it again. | ||
+ | |||
+ | --[[User:Jimbo|Jimbo]] 23:04, 12 Jan 2005 (EST) | ||
+ | |||
+ | == all java applets refuse to load, zombie mozilla == | ||
+ | |||
+ | Result: all java applets refuse to load under mozilla and firebird (yes, java is enabled and shows up under "about plugins" in mozilla). Linux-mozilla doesn't see java. | ||
+ | |||
+ | After a reboot, starting mozilla always gets me a zombie process, and mozilla won't actually open! | ||
+ | |||
+ | Any ideas how to un-hose mozilla? | ||
+ | |||
+ | == unhosing moz == | ||
+ | |||
+ | try removing the link in the plugins dir for mozilla | ||
+ | |||
+ | --[[User:Dave|Dave]] 11:15, 14 Jan 2005 (EST) | ||
+ | |||
+ | == Reinstalled mozilla X3 == | ||
+ | |||
+ | Still getting "Applet app notinited" and other error messages, no java applet ever loads. I get a blank page with a 'x' as the end result. Java still shows in "about plug-ins" | ||
+ | |||
+ | Got the zombie mozilla again, re-reinstalled. Got it yet again, re-re-reinstalled mozilla. Got rid of mozilla-bonobo, no more zombie mozilla (I since learned to delete the 'lock' file when mozilla gets hosed). | ||
+ | |||
+ | Now java still gets "Applet <name of applet> notinited" even under root (as a permission problem had to be tested for), with all cookies allowed and popup blocks disabled. Firebird gives me the same problem. | ||
+ | |||
+ | Clicking the about java in the blank page with the red 'X' in the upper left corner will bring up two options; clicking any of those crashes mozilla. | ||
+ | |||
+ | I'm out of ideas so I asked someone on IRC. | ||
+ | |||
+ | He mentionned "make a libmap.conf" and wouldn't give more details. Anyone knows if making a libmap.conf is any better than a symlink, and why, and especially how? | ||
+ | |||
+ | [[User:Simon|relax]] | ||
+ | |||
+ | == Java -version fails == | ||
+ | |||
+ | Despite the java plugin showing up under "about plugins", if I type | ||
+ | java -version | ||
+ | I get an error message - it won't find the java executable! | ||
+ | |||
+ | javavm -version will work. | ||
+ | |||
+ | How do I fix that?? | ||
+ | |||
+ | [[User:Simon|relax]] | ||
+ | |||
+ | I've reinstalled everything from scratch yet again, and "java -version" still won't work! | ||
+ | |||
+ | The next java install will be the last - job offer has timed out! Can somebody help me for next time?? | ||
+ | |||
+ | [[User:Simon|relax]] | ||
+ | |||
+ | == if it's something you need for a job... == | ||
+ | |||
+ | why not install a linux? FreeBSD is great, but choose the apropriate tool for the job man...or is it specifically "FreeBSD+Java" that this job requires? My laptop doesn't have enough space for a java install so I can't fully test stuff, and my *nix workstations at work are redhat, solaris and debian(xfld). | ||
+ | --[[User:Dave|Dave]] 20:58, 18 Jan 2005 (EST) | ||
+ | |||
+ | ==Simon Says== | ||
+ | Why would I go thru 200 bloody hours of non-documented install on FreeBSD if there wasn't a job offer requiring it? Yes I'd use Linux, a commodore 64, a programmable hand calculator, Windows, or even lite-brite instead if I'm allowed by the boss. (-; | ||
+ | |||
+ | It turns out the competing candidates couldn't install Java on any FreeBSD browser either so the project is dead - considering this is something a 12 year old gamer can figure out in less than an hour on windows, I've developped a not very polite opinion of whoever wrote this port without leaving proper install notes or at least labeling it broken (as we don't have a "can be inhumanely hard to configure on some systems" label). | ||
+ | |||
+ | For the record on FreeBSD, the license and file fetching is only 1% of the problem. | ||
+ | |||
+ | It reminds me of /usr/ports/lang/dis (that's a pkg-descr is worth reading!) | ||
+ | |||
+ | Anyhow. I've realised that to get help from the wiki, my best bet is to make it known until we get lots more users including a few nice unix wizards. | ||
+ | |||
+ | I'll give java another try maybe next week - if only to write a java plugin troubleshooting page. | ||
+ | |||
+ | [[User:Simon|relax]] |
Latest revision as of 07:32, 12 September 2011
[edit] This didn't help!!
I'm just trying to have simple java application run in mozilla or linux-mozilla (whichever works first) but the about plugins refuses to list java for some reason despite the symlink. I don't need the whole SDK.
I've installed linux-mozilla and the jre and everything else. Flash works fine by the way, I don't see which step Java requires that Flash didn't...
I've been at this for weeks, but now I've got internet to help me finally! Except another 2 days was fruitless.
If I get that last step to work I promise a full walkthru in the wiki. But for now, I'm 100% stumped.
For your info, I'm a bottom feeder rookie on FreeBSD (i.e. a traumatized Windoze regugee). Detailed explanations are welcome.
[edit] to make a long story much shorter
You need a working java compiler to compile java on a freebsd system. so the work around is to install the linux jdk, add the files that building java requires (in /usr/ports/distfiles -- all those files that the webpage says to install) and then go into /usr/ports/java/jre (or jdk14 or whatever) and build it. It takes a) a long time and b) a lot of diskspace. I understand that if you install the linux browser (instead of compiling mozilla/firefox from ports or using freebsd pkg) you can also use the linux java jre with it.
[edit] ...
Can you say that in terms of what the exact things to type are?
What is linux-mozilla and its difference from mozilla? Is that what I need?
In any case the "enable" step seems not to work at all. The plugin listing won't show java.
[edit] also
see this link form the newbies mailing list: http://www.freebsd.org/cgi/getmsg.cgi?fetch=107129+112090+/usr/local/www/db/text/2004/freebsd-newbies/20041107.freebsd-newbies
you may fare better by installing one of the diablo binaries: http://www.freebsdfoundation.org/downloads/java.shtml
Diablo:
"These binaries are not intended for use with FreeBSD 5.x, due to a binary compatibility issue we are working with the FreeBSD release engineering team to resolve."
so I can't use that. I'll check the newbie thing. Thanks!
[edit] in which case,
it would seem (from what i've read) that your only option is to either use the linux mozilla and linux java on your freebsd5 system, or install the linux jdk so that you can make a freebsd jdk so that you can THEN compile the JRE native for your system. (althogh once you've got the JDK, you can stop there, obviously -- you'd only need to build the jre if you wanted to delete the jdk afterwards.)
[edit] "Linux" ports
FYI, anything you see in the ports labeled "linux-[something]" is a "fake port" - it's not really something you'll compile locally, typically, it's a distributed binary which expects to be run under a Linux system, that will be run by your system under the Linux Binary Compatibility layer. (Which you'll want to make sure you have installed, if you need to run any linux binaries. Natch.)
--Jimbo 11:00, 28 Dec 2004 (PST)
[edit] yes,
this being the reason you need to install a linux java before you can make your freebsd native version; building the java jdk/jre requires...wait for it...a working java jdk. which you won't have. so you need to use the linux version under the linux emulation layer (which is why you have the "kldload procfs" lines in the quick & dirty howto on the Java page). After you've used it to make your java that runs native on freebsd (without linux emulation,) you can deinstall the linux-java and hell, even make a package from it on that system and copy it over vis NFS or scp or whatever to other systems. (as the author of the taosecurity site I linked to on the Java page did, incidentally.)
[edit] Linux base 7 won't do java
My Linux base 7 isn't compatible with java for mozilla if I get it correctly.
And what's that flashwrapper thing???
[edit] did you install linux compatibility and load procfs ?
%cd /usr/ports/java/linux-sun-jdk14
%make install ===> linux-sun-jdk-1.4.2.05 You must manually fetch the J2SE SDK self-extracting file for the Linux platform (j2sdk-1_4_2_05-linux-i586.bin) from http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-1.4.2_05-oth-JPR&SiteId=JSC&TransactionId=noreg, place it in /usr/ports/distfiles and then run make again.
%more pkg-message ....====================================================================== Warning: This JDK may be unstable. You are advised to use the native FreeBSD JDK, in ports/java/jdk14.
This Java VM will attempt to obtain some system information by accessing files in linux's procfs. You must install the Linux emulation procfs filesystem for this to work correctly. The JVM will exhibit various problems otherwise. This can be accomplished by adding the following line to your /etc/fstab file:
linprocfs /compat/linux/proc linprocfs rw 0 0
and then, as root, executing the commands:
kldload linprocfs mount /compat/linux/proc
.....====================================================================== %
---
I get this:
LoadPlugin: failed to initialize shared library /usr/home/relax/j2re1.4.2_06/plugin/i386/ns610-gcc32/libjavaplugin_oji.so [Shared object "libdl.so.2" not found]
What's the problem?
[edit] not following you
what order did you do this in?
--install linux compat via sysinstall --add the linprocfs line to /etc/fstab --kldload etcetcetc --install the linux java port?
[edit] = what relax did:
1. install linux compat via sysinstall (unsure of success) 2. add the linprocfs line to /etc/fstab 3. kldload etcetcetc (as per make install message I get when I compile) 4. install the linux java port 5. install the jdk14 6. follow the unclear, incomplete instruction that seem to want a ln between mozilla and the JRE:
cd <Mozilla>/plugins ln -s <JRE>/plugin/i386/ns610-gcc32/libjavaplugin_oji.so .
And starting mozilla gets me the error message I mentionned.
How do I verify step 1 is done OK, knowing I don't get compile errors?
What am I expected to do in step 6, exactly? Link mozilla? Link linux-mozilla? In /usr/X11R6/include/mozilla/plugin or elsewhere? And once I've done that, do I start mozilla or linux-mozilla or linux-mozillafirebird or what? Exact commands are needed, the 6 walkthrus I've read are all unclear and inconsistent on what to do on step 6 and what browser can or can't run java.
And what is diablo-latte (which I messed up apparently, as it can't be pkg_add or pkg_delete or deinstall or install)? Does that interfer?
P.S.: I'm using the 1.4.2_02 version, in theory, as the 1.4.2_06 compile simply dumps core without explanation of any kind.
[edit] so wait
which mozilla are you using? the linux-mozilla port or the native BSD? the ln -s between the JRE and the mozilla will only work if both are either native or both are linux ports.
from your description, what you did is what you're supposed to. ln -s <Java plugin.so PATH> <mozilla directory>
although....if you installed the linux-moz and you had the freebsd moz installed already, you may have copied the file to the wrong direcotry....find out where the linux mozilla port installed to -- could be /usr/local/somethingsomething/something ...you might be able to find out with pkg_info.
also, the diablo JDK does not install with pkg_add -- I was wrong about that. you need to download that to /usr/ports/distfiles and then go into /usr/ports/java/diablo-jdk (or whatever the dir is,) and do a make install there. (DO NOT UNTAR/UNZIP the tgz btw). let me know how that works out for you.
--Dave 20:04, 11 Jan 2005 (EST)
[edit] as i stated before....
As I stated before, Diablo-jre-1.3.1.0 can't be pkg_add or pkg_delete or make install or make deinstall - in all cases I get errors saying it's installed - or not installed. The comment is listed as "???" in pkg_info. I'm not even sure diablo-jre is or isn't part of the install as jre-1.1.8 is installed to. Which JRE is the good one?
I've spend 34 hours already trying the possible permutations of that "ls -s <etc>" command and didn't find the right one - and I'm out of options (and yes I used rehash). Even if I had the right one how do I recognize it if there is still a bug or missing step somewhere??
What I really, really need is a clean walkthru as I've now got 7 incomplete and unclear ones who contradict each other and the combinaisons of possibilities have all been tried - there must be a small step missing or the diablo problem is preventing java from working.
If I reach my 10th install from scratch to see if I can't get it right this time and still fail (currently: 8th) I'll simply have to let go of a nice job offer involving java beta testing ... *shudder*
[edit] do not use pkg_add
don't use the package tools to install diablo.
how to install diablo-jre:
- download the diablo .tgz or .tbz
- mv it to /usr/ports/distfiles
- cd into /usr/ports/java/diablo-jre
- make install
--Dave 11:40, 12 Jan 2005 (EST)
---
As I stated before, Diablo-jre-1.3.1.0 can't make install or make deinstall.
To be more specific:
Result for make install: error message saying it's already installed.
Result for deinstall: Error message saying it's not installed.
I'm still clueless if Diablo is necessary or not to some or all install types, browser types, or if it's a linux-emulation thing, or whatever. What is Diablo? Do I really need it?
If it's not 100% mandatory, how do I install java without the badly-installed Diablo getting in the way of java working in the browser (if that's my problem)?
[edit] see also
http://taosecurity.blogspot.com/2004_01_01_taosecurity_archive.html#107404060982021452
[edit] Thanks, I'll try that next!
Thanks, I'll try that next!
[edit] hosed up diablo install
# cd /var/db/pkg # ls -l | grep iablo
any hits? if you see "diablo-[version number]" in there, then
# rm -rf diablo-[version-number]
then
# pkgdb -F
and any ports which have diablo as a dependency, tell it to delete that dependency entirely. Then you can go back into the diablo port itself and try building it again.
--Jimbo 23:04, 12 Jan 2005 (EST)
[edit] all java applets refuse to load, zombie mozilla
Result: all java applets refuse to load under mozilla and firebird (yes, java is enabled and shows up under "about plugins" in mozilla). Linux-mozilla doesn't see java.
After a reboot, starting mozilla always gets me a zombie process, and mozilla won't actually open!
Any ideas how to un-hose mozilla?
[edit] unhosing moz
try removing the link in the plugins dir for mozilla
--Dave 11:15, 14 Jan 2005 (EST)
[edit] Reinstalled mozilla X3
Still getting "Applet app notinited" and other error messages, no java applet ever loads. I get a blank page with a 'x' as the end result. Java still shows in "about plug-ins"
Got the zombie mozilla again, re-reinstalled. Got it yet again, re-re-reinstalled mozilla. Got rid of mozilla-bonobo, no more zombie mozilla (I since learned to delete the 'lock' file when mozilla gets hosed).
Now java still gets "Applet <name of applet> notinited" even under root (as a permission problem had to be tested for), with all cookies allowed and popup blocks disabled. Firebird gives me the same problem.
Clicking the about java in the blank page with the red 'X' in the upper left corner will bring up two options; clicking any of those crashes mozilla.
I'm out of ideas so I asked someone on IRC.
He mentionned "make a libmap.conf" and wouldn't give more details. Anyone knows if making a libmap.conf is any better than a symlink, and why, and especially how?
[edit] Java -version fails
Despite the java plugin showing up under "about plugins", if I type java -version I get an error message - it won't find the java executable!
javavm -version will work.
How do I fix that??
I've reinstalled everything from scratch yet again, and "java -version" still won't work!
The next java install will be the last - job offer has timed out! Can somebody help me for next time??
[edit] if it's something you need for a job...
why not install a linux? FreeBSD is great, but choose the apropriate tool for the job man...or is it specifically "FreeBSD+Java" that this job requires? My laptop doesn't have enough space for a java install so I can't fully test stuff, and my *nix workstations at work are redhat, solaris and debian(xfld). --Dave 20:58, 18 Jan 2005 (EST)
[edit] Simon Says
Why would I go thru 200 bloody hours of non-documented install on FreeBSD if there wasn't a job offer requiring it? Yes I'd use Linux, a commodore 64, a programmable hand calculator, Windows, or even lite-brite instead if I'm allowed by the boss. (-;
It turns out the competing candidates couldn't install Java on any FreeBSD browser either so the project is dead - considering this is something a 12 year old gamer can figure out in less than an hour on windows, I've developped a not very polite opinion of whoever wrote this port without leaving proper install notes or at least labeling it broken (as we don't have a "can be inhumanely hard to configure on some systems" label).
For the record on FreeBSD, the license and file fetching is only 1% of the problem.
It reminds me of /usr/ports/lang/dis (that's a pkg-descr is worth reading!)
Anyhow. I've realised that to get help from the wiki, my best bet is to make it known until we get lots more users including a few nice unix wizards.
I'll give java another try maybe next week - if only to write a java plugin troubleshooting page.