Cannot run .jar file in terminal, can run in Firefox

Tim timfrost at xtra.co.nz
Wed May 14 11:21:03 UTC 2008


On Wed, 2008-05-14 at 00:26 +0300, Dotan Cohen wrote:
> 2008/5/13 NoOp <glgxg at sbcglobal.net>:

> > Both pages use:
> >
> > ====
> > <p align="center"><a name="OperationsOnVectors"
> > class="doclink"></a><applet code="OperationsOnVectors"
> > codebase="../applets/" archive="operationsOnVectors.jar, mk_lib.jar,
> > parser_math.jar, jcbwt363.jar" width=760 height=450>
> >  </applet></p>
> > ====
> >
> > so maybe you need to use the additional .jar's? Don't know as I've no
> > java experience.

The other consideration is that because the code is an applet, it is
built to run inside a browser, rather than running as a stand-alone
application.  This can be handled by putting the above html code in a
file that is presented to appletviewer (which should be set up as part
of the jvm installation for Sun java 5 or 6).  You will still need all
the referenced jar files to be in the correct directory relative to the
html code (the directory ../applets/ is identified in the codebase
attribute in the snippet of HTML that NoOp cites).  An applet depends on
the environment (browser/appletviewer) to provide some of the system and
initialisation functionality.

This model is in contrast to a java application, such as tomcat, which
expects to be invoked using the java command (which Dotan was using to
invoke operationsOnVectors.jar).


Tim





More information about the ubuntu-users mailing list