Create a shell script to call `java Example' for you a la
#!/bin/sh
# Set up any defaults just in case
: ${JAVAVM:=java|kaffe|jikes}
: ${CLASSPATH:=/whatever/man}
: ${SWING_HOME:=/you/know/what/time/it/is}
export SWING_HOME CLASSPATH
${JAVAVM} Example
# fini
Or read the Linux-Java-HOWTO (or is Java-Linux-HOWTO) at the LDP
which explains how to configure the kernel so that it will automatically
execute a java class file.
Not recommended for everyday java software development and release
with all the changes in JDK/JFC/JMF and other
forthcoming java extensions unless you are planning to build an
embedded java based system where the contents of the system
are very well defined. And in any case you would have to set
up a precise environment to find all the extension
I theorise.
Pete
"Java: mad for it!"
______________________________ Reply Separator _________________________________
Subject: Re: Does Java apps has to have .class extension?
Author: javanews ([EMAIL PROTECTED]) at lon-mime
Date: 05/10/98 21:52
At 08:19 PM 10/5/98 -0400, Danny Lu wrote:
>But when I try to run a example program I wrote.. and I change
>the extension.. I got an error stating "Can't find class Example"
>
>okay at first I tried to compile my example program:
> javac Example.java
>
>and I got Example.class... now I change the name of the Example.class to
>Example:
> mv Example.class Example
Your requirement seems strange but, have you tried;
ln Example.class Example
and then execute Example ? I don't know if this will address your problem
since you didn't tell us what you are trying to do.
Another solution may be to create a script that contains "java Example".
>then I made the example executable:
> chmod u+x Example
>
>and then I ran it...
> ./Example
>
>I got the error message saying:
> "Can't find class Example"
>
>that's what I was trying to say hehe =)
>
>Dan
Just a work around if it helps.
Douglas Toltzman