*BSD News Article 69651


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!solace!nntp.uio.no!news2.interlog.com!winternet.com!news.cinenet.net!not-for-mail
From: mercier@cinenet.net (Bob Mercier)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Java, JDK & FreeBSD
Date: 28 May 1996 23:22:32 GMT
Organization: Cinenet Communications,Internet Access,Los Angeles;310-301-4500
Lines: 45
Message-ID: <4og1ro$hlv@marina.cinenet.net>
References: <4ofsuh$9h0@mitzi.rsmas.miami.edu>
NNTP-Posting-Host: hollywood.cinenet.net
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]

Ivan Lima (ivan@nauplius.rsmas.miami.edu) wrote:
: Does anyone know where I can get some documentation on JDK for FreeBSD
: and kaffe?  I Installed both in my system but I'm getting error
: messages when I try to compile java code, like:
: 
: nauplius> javac anim.java
: No library path set.
: Failed to locate native function:
:         java/io/FileDescriptor.initSystemFD(Ljava/io/FileDescriptor;I)Ljava/io/FileDescriptor;
: Memory fault - core dumped
: 
: Any help will be gratly appreciated.
: 
: Ivan
: --

I don't know if this is generally known so I'll post it here.  You
can compile Java source with netscape on FreeBSD...

	o make a directory: /usr/local/lib/netscape
	o get the BSDI version of netscape/atlas and
	  install it, copying moz3_0.zip to /usr/local/lib/netscape.
	o get classes.zip from the sparc JDK and copy it
	  to /usr/local/lib/netscape
	o Make a shell script like:

		#!/bin/sh
		CLASSPATH=/usr/local/lib/netscape/classes.zip:.
		JAVA_HOME=/usr/local/lib/netscape
		export CLASSPATH JAVA_HOME
		netscape -java sun.tools.javac.Main $*
	
	  and call it javac.

This works pretty well for me.  While I'm sure it's not as fast
as kaffe, the last version of kaffe I tried generated different
bytecode (that crashed) on some applets.

Remember:  The Java compiler is a Java program, even when you
obtain the ``native'' JDK for your platform.  The Java runtime
executes the compiler to compile .java into .class.  Starting
with Netscape 3.0, including atlas, you have direct access to
the Java runtime included in the navigator...

Bob