469,314 Members | 2,196 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,314 developers. It's quick & easy.

Java script java class

Hello,

I need to access java class in a jar file using a javascript. Is there
any way to do this other than using a java applet ? Please help ..

Prashan
Jul 28 '08 #1
2 1182
pr**************@gmail.com schreef:
Hello,

I need to access java class in a jar file using a javascript. Is there
any way to do this other than using a java applet ? Please help ..

Prashan
You didn't specify where this class in the JAR is.

The problem is simple: JavaScript is executed in the browser.
Java is not, unless you make an applet.
If you do that, you can let them communicate.
The easiest way to let JavaScript and Java communicate IN THE BROWSER is
using this:
http://java.sun.com/products/plugin/.../jsobject.html
If you need to use a class that is on the server, you cannot access it
directly, but maybe this helps: You could create an Ajaxoid-call to a
JSP page (or PHP, or whatever suits your needs AND can access java) that
calls the appropriate function in the JAR for you on the server.

If you need more help, be more clear on what you try to achieve.

Regards,
Erwin Moller
Jul 28 '08 #2
pr**************@gmail.com wrote:
I need to access java class in a jar file using a javascript. Is there
any way to do this
STFW for "LiveConnect OR XPConnect". "Java JavaScript" would also do.
other than using a java applet ?
Obviously, you cannot use a *Java* applet to access a Java class with
*JavaScript* (or any other ECMAScript implementation).
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Jul 28 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Phil Powell | last post: by
reply views Thread by James Hong | last post: by
1 post views Thread by Raja | last post: by
9 posts views Thread by Stephen H. | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.