Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 1996 06:01:17 -0700
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        hackers@freebsd.org
Subject:   Was frustrated by lack of java applet viewer, threw this together..
Message-ID:  <3183.832338077@time.cdrom.com>

next in thread | raw e-mail | index | archive | help
Implemented as a shell function:

function java {
	if [ $# -ne 1 ]; then
		echo "Usage: $0 classname"
		return 1
	fi
	base=`dirname $1`/`basename $1 .java`
	if [ ! -f $base.html ]; then
		echo "No such file: $base.html"
		return 2
	fi
	netscape -remote "openURL(file:`pwd`/$base.html)"
}

It works fairly well!  If you've got `javac' set up to use Netscape as
the compiler, then compiling and previewing your java applet becomes
as easy as:

	javac Foo.java
	java Foo.java

					Jordan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3183.832338077>