f



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
0
7/28/2008 11:38:56 AM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

2 Replies
757 Views

Similar Articles

[PageSpeed] 38

prashan.buddhika@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/1.3/docs/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
0
Erwin
7/28/2008 12:48:58 PM
prashan.buddhika@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, <f806at$ail$1$8300dec7@news.demon.co.uk>
0
Thomas
7/28/2008 1:13:58 PM
Reply:

Similar Artilces:

Poll: Is a Java Method an Instance of the Java Class java.lang.reflect.Method? Please reply with YES or NO.
Hi, Poll: Is a Java Method an Instance of the Java Class java.lang.reflect.Method? Please put YES or NO as the first word in your reply. Add comments after it if you wish. I'll make a YES/NO count after some time. Kind regards, Paka Paka Small wrote: > Poll: Is a Java Method an Instance of the Java Class > java.lang.reflect.Method? It's not subject to vote. It's defined by the language. You might as well ask, "Is 'int' a primitive or a reference type?". Your vote will not change reality. > Please put YES or NO as the first word in your reply. Add c...

Java Java
Have my first Open Source Linux Java Project. Working on a second right now. Coming out with a distro called OPEN*WINDOWS. It will be at www.black-and-company.com tab wrote: > Have my first Open Source Linux Java Project. > Working on a second right now. > > Coming out with a distro called OPEN*WINDOWS. > > It will be at www.black-and-company.com > Wasn't that the whole point of Lindows? Oh, right, we didn't care for that either. tab wrote: > Have my first Open Source Linux Java Project. > Working on a second right now. > > Coming out with a ...

java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException
Hi, I am new to DB2. I am getting this error while loading the DB2Driver. I don't have any idea about where i might have gone wrong. please help me. Below is the stack trace. Stack Trace: java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv(Native Method) at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:245) at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:130) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Cla...

Java in Java
Is it possible to download a Java app (applet etc?) and run it inside a desktop Java app? -- Dirk http://www.transcendence.me.uk/ - Transcendence UK http://www.theconsensus.org/ - A UK political party http://www.onetribe.me.uk/wordpress/?cat=5 - Our podcasts on weird stuff Dirk Bruere at NeoPax wrote: > Is it possible to download a Java app (applet etc?) and run it inside a > desktop Java app? > Quite likely, but you won't necessarily get the same security model, unless you were careful about it. -- Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/&g...

Passing java.lang.Class type as an argument to Java method
I am trying to set the default cell renderer for a JTable from within Matlab. All my efforts to this point have been based on Sun's 'How To Use Tables' tutorial. According to methodsview('JTable') the signature of the function is setDefaultRenderer(java.lang.Class,javax.swing.table.TableCellRenderer ) I cannot get this function to executed, and I think its because I cannot create a java.lang.Class argument from within Matlab. Following a corresponding code snipit: import javax.swing.*; import java.awt.*; import java.awt.event.*; columnNames = { 'First Name', &...

java.lang.StringIndexOutOfBoundsException: String index out of range: 23 at java.lang.String.charAt(String.java:460)
Hi All I am having the torque3.1.jar and postgresql-7.4. I have compiled the new jdbc driver called as postgresql.jar and have placed it in the lib directory from where the ant scripts catch the jars. Whenever i try to access through torque gestList = BaseGestlistPeer.doSelect(new Criteria()); this error arises java.lang.StringIndexOutOfBoundsException: String index out of range: 23 at java.lang.String.charAt(String.java:460) at org.postgresql.jdbc2.ResultSet.toTimestamp(ResultSet.java:1653) at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java...

Instance java.lang.Object.getClass() of Class Java Method on OO Tumia
Hi, You are kindly invited to check out the Instance java.lang.Object.getClass() of Class Java Method on the object oriented directory Tumia: http://www.tumia.org/en/directory/en/java.lang.object.getclass%28%29_p1.html - Click some java.lang.Object.getClass() links or in the upper toolbar: - click the "-->"-button for the following java.lang.Object.getClass() links or - use the Tumia Instance combobox to select another Instance or - use the Tumia Class combobox to select another Class or - use the Relat. Instan. combobox to select a Related Instance. Kind regards, Paka Small ...

Instance java.lang.Object.getClass() of Class Java Method on OO Tumia
Hi, You are kindly invited to check out the Instance java.lang.Object.getClass() of Class Java Method on the object oriented directory Tumia: http://www.tumia.org/en/directory/en/java.lang.object.getclass%28%29_p1.html - Click some java.lang.Object.getClass() links or in the upper toolbar: - click the "-->"-button for the following java.lang.Object.getClass() links or - use the Tumia Instance combobox to select another Instance or - use the Tumia Class combobox to select another Class or - use the Relat. Instan. combobox to select a Related Instance. Kind regards, Paka Small ...

Instance java.lang.Object.getClass() of Class Java Method on OO Tumia
Hi, You are kindly invited to check out the Instance java.lang.Object.getClass() of Class Java Method on the object oriented directory Tumia: http://www.tumia.org/en/directory/en/java.lang.object.getclass%28%29_p1.html - Click some java.lang.Object.getClass() links or in the upper toolbar: - click the "-->"-button for the following java.lang.Object.getClass() links or - use the Tumia Instance combobox to select another Instance or - use the Tumia Class combobox to select another Class or - use the Relat. Instan. combobox to select a Related Instance. Kind regards, Paka Small On...

Instance java.lang.Object.getClass() of Class Java Method on OO Tumia
Hi, You are kindly invited to check out the Instance java.lang.Object.getClass() of Class Java Method on the object oriented directory Tumia: http://www.tumia.org/en/directory/en/java.lang.object.getclass%28%29_p1.html - Click some java.lang.Object.getClass() links or in the upper toolbar: - click the "-->"-button for the following java.lang.Object.getClass() links or - use the Tumia Instance combobox to select another Instance or - use the Tumia Class combobox to select another Class or - use the Relat. Instan. combobox to select a Related Instance. Kind regards, Paka Small ...

Communicating from java script to java
Dear All I am using JDK 6 , Tomcat 6 and Jena 2.5.2. I would like to use javascript on my jsp page to pass the values of text boxes to a java function I have. This java function uses the Jena library to extract some info from OWL file based on parameters passed to it . I'd extremely apprecite you help : Assuming my jsp page is in folder [Tomcat] \webapps\mytest and Jena libraries are in [Tomcat] \webapps\mytest\WEB-INF 1. Where (which folder) should I store my java class (java function) ? 2. How can I use javascript to call the Java function and pass values to it (to invoke it so...

java & java script
hi, excuse this naive question from a newbie, but i am wondering what the differences are between 'java' and 'java script'. i know that java script is a language thats embedded in the html of the brouser and the clients machine then interprets that, so then is java a compiled version of a program that resides on the server? thanks jeremy Jeremy Watts wrote: > excuse this naive question from a newbie, but i am wondering what the > differences are between 'java' and 'java script'. The better question is: what do they have in common? The answer: ...

java & java script
hi, excuse this naive question from a newbie, but i am wondering what the differences are between 'java' and 'java script'. i know that java script is a language thats embedded in the html of the brouser and the clients machine then interprets that, so then is java a compiled version of a program that resides on the server? thanks jeremy "Jeremy Watts" <jwatts1970@hotmail.com> wrote in message news:zjIXc.108$CB5.21@newsfe1-win.ntli.net... > hi, > > excuse this naive question from a newbie, but i am wondering what the > differences are betw...

java.lang.Set with elements of type java.lang.Set
Roughly I do something along the lines of: Set set = new HashSet(); Set elem = new HashSet(); set.add(elem); // now we change the elem and add it again to the set elem.add(some object here); set.add(elem); I found out the hard way that 'set' may now contain 'elem' either once or twice, the reason being that 'elem.add()' changes the hashCode of elem such that it is not noticed that it is in 'set' already on the 2nd 'set.add()'. Question: What I would actually want is an IdentityHashSet() set = new IdentityHashSet() but this does not...

Web resources about - Java script java class - comp.lang.javascript

Seal script - Wikipedia, the free encyclopedia
Seal script ( simplified Chinese : 篆书 ; traditional Chinese : 篆書 ; pinyin : zhuànshū ) is an ancient style of Chinese calligraphy . It evolved ...

China must follow its own reform script
Can China's authorities loosen up enough for China to complete its economic transition?

Bahamas man accused of hacking celebs, stealing movie scripts & sex tapes
... who stands accused of hacking into the e-mail accounts of celebrities and entertainment studios, then trying to sell off unreleased scripts, ...

Hacker arrested for stealing celebrities’ movie scripts and sex tapes
A 23-year-old hacker from the Bahamas was arrested after he managed to access personal data belonging to certain celebrities, including scripts ...

Gilead Sciences, Inc. Faces Troubled HCV Scripts as AbbVie Inc Scripts Go Up
Gilead HCV prescriptions decline, while AbbVie sees an increase in HCV scripts.

Google Apps Script: Tracking add-on usage with Google Analytics
... blog Posted by Romain Vialard, a Google Developer Expert and developer of Yet Another Mail Merge , a Google Sheets add-on. Google Apps Script ...

Studio: Tupac Shakur film script was offered by hacker
"Celebrity hacker" allegedly accessed more than 100 email accounts of actors, athletes and media personnel and tried to sell unreleased scripts ...

Bulls flip the script in stunning Christmas Day victory over Thunder
Chicago Tribune Bulls flip the script in stunning Christmas Day victory over Thunder Chicago Tribune The Bulls swept away their negative vibes ...

The Hateful Eight Ending Differences from Script Revealed - Collider
Brian Formo attended a live read of 'The Hateful Eight' in 2014 and he reveals all the ending changes from Quentin Tarantino's script to the ...

John Boyega Says Star Wars Episode VIII Has A Much Darker Script
, then Episode VIII will take cues from The Empire Strikes Back, adopting a darker tone, according [...]

Resources last updated: 1/24/2016 10:14:58 AM