pavement

Talk:Java

From FreeBSDwiki
Revision as of 18:16, 10 January 2005 by Dave (Talk | contribs)
Jump to: navigation, search

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.

relax

Contents

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.

Dave

=

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.

relax

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!

relax

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.)

"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)

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.)

Dave

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???

relax

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?

relax

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?

Personal tools