473,385 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1277
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil Powell | last post by:
URL: http://valsignalandet.com/cookiegrab.php?name=valIdentifier This page produces a cookie value and sends it back as HTML using PHP and Javascript to obtain it. This URL will be used as the...
0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
1
by: Raja | last post by:
I have a java class thats trying to call something in python. This works fine when i do a jythonc on the python script. When i call another python script from the __init__ of my called python...
2
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on...
9
by: Stephen H. | last post by:
Hi, I have an existing web application with java beans that I wanne migrate to ASP.NET using C#. The existing web application has some jsp files that use java beans as follows: .... <%@...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
2
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: ...
7
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference....
0
by: tosreejithp | last post by:
Hi, My first problem was i am not able to compiled a file from java script to java class.Now its clear and working fine..now i can convert a java script file to java class by Rhino Java Script...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.