File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes can we call a javaclass from a javascript function? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "can we call a javaclass from a javascript function?" Watch "can we call a javaclass from a javascript function?" New topic
Author

can we call a javaclass from a javascript function?

indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
Hi

How to call a javaclass(with main method in it) from a javascript function ??


thanks,
indu
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
A "main" method only has relevance if you want to start a Java application. Is that what you want to do, or do you just want to call some Java method and have it return some result to the JavaScript code?
bala nannaka
Ranch Hand

Joined: Apr 02, 2007
Posts: 49
With Ajax or DWR you can call a java class (Server side component) from a javascript function.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Re: DWR... That's *sort* of true, but you're not directly calling the java class. It *looks* like you are--but you're not. The difference may only be semantic, but it's a very important distinction to make.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43399
    
  32
Moving to Javascript forum.
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
thankyou somuch for responding...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can we call a javaclass from a javascript function?
 
It's not a secret anymore!