FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 05-13-2008, 10:15 AM
"Dotan Cohen"
 
Default Cannot run .jar file in terminal, can run in Firefox

$ java -jar operationsOnVectors.jar
Failed to load Main-Class manifest attribute from
operationsOnVectors.jar
hardy2@hardy2-laptop:~/Incoming/firefox$

The applet comes from my university website:
http://ocw.math.technion.ac.il/18/18.013a/f01/tools/tools/applets/

And can be run on this page:
http://ocw.math.technion.ac.il/18/18.013a/f01/tools/tools/html/tools18.html

Thanks in advance for any advice on running the applet locally.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-*-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-13-2008, 06:23 PM
NoOp
 
Default Cannot run .jar file in terminal, can run in Firefox

On 05/13/2008 03:15 AM, Dotan Cohen wrote:
> $ java -jar operationsOnVectors.jar
> Failed to load Main-Class manifest attribute from
> operationsOnVectors.jar
> hardy2@hardy2-laptop:~/Incoming/firefox$
>
> The applet comes from my university website:
> http://ocw.math.technion.ac.il/18/18.013a/f01/tools/tools/applets/
>
> And can be run on this page:
> http://ocw.math.technion.ac.il/18/18.013a/f01/tools/tools/html/tools18.html

Actually it doesn't run on that web page correctly either - note that
the File & Graph dropdown tabs don't work. To see how it should actually
look/work, see:

<http://ocw.mit.edu/ans7870/18/18.013a/textbook/HTML/chapter03/section03.html>

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.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-13-2008, 09:26 PM
"Dotan Cohen"
 
Default Cannot run .jar file in terminal, can run in Firefox

2008/5/13 NoOp <glgxg@sbcglobal.net>:
> On 05/13/2008 03:15 AM, Dotan Cohen wrote:
>> $ java -jar operationsOnVectors.jar
>> Failed to load Main-Class manifest attribute from
>> operationsOnVectors.jar
>> hardy2@hardy2-laptop:~/Incoming/firefox$
>>
>> The applet comes from my university website:
>> http://ocw.math.technion.ac.il/18/18.013a/f01/tools/tools/applets/
>>
>> And can be run on this page:
>> http://ocw.math.technion.ac.il/18/18.013a/f01/tools/tools/html/tools18.html
>
> Actually it doesn't run on that web page correctly either - note that
> the File & Graph dropdown tabs don't work. To see how it should actually
> look/work, see:
>
> <http://ocw.mit.edu/ans7870/18/18.013a/textbook/HTML/chapter03/section03.html>
>
> 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.
>

Thanks. I did not look at the source of the page to determine what
else might be there. I don't know how to launch a jar such that it
will find the other files (I'll download them). I will start googling
and post back if I can get this to work. Thanks.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-*-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-14-2008, 11:21 AM
Tim
 
Default Cannot run .jar file in terminal, can run in Firefox

On Wed, 2008-05-14 at 00:26 +0300, Dotan Cohen wrote:
> 2008/5/13 NoOp <glgxg@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


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-14-2008, 12:11 PM
"Dotan Cohen"
 
Default Cannot run .jar file in terminal, can run in Firefox

2008/5/14 Tim <timfrost@xtra.co.nz>:
>
> 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).
>

Thank you Tim, I did not realize that there would be different
environmental variables available to the applet depending on where it
was run. I suppose that it makes sense. When I return to that project
I will simply write a local HTML page that will mimic the page on the
university website. Thanks.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-*-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 02:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org