• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using JAVA with java-script

 
Greenhorn
Posts: 12
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want to initiate some JAVA object(desktop-app) by JAVA-script. Anyone cane help me that how it will be possible?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java cannot interact with the local filesystem for security reasons. JavaScript can interact with a Java applet.
 
Naeem Arshad
Greenhorn
Posts: 12
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gregg Bolinger! Any other solution to initiate some JAVA object or interacting with some desktop application via java-script(or anything) to the HTML/JSP page?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Naeem Arshad wrote:Gregg Bolinger! Any other solution to initiate some JAVA object or interacting with some desktop application via java-script(or anything) to the HTML/JSP page?



Naeem Ashad! No. Like I said, JavaScript is crippled from being able to communicate with anything outside of the browser for security reasons. I suppose you could write an Applet that was digitally signed and had security rights on the client machine and a desktop app, er, that already sounds way overly complicated. Maybe if you describe what you are trying to do and why we can suggest some alternatives.
 
Naeem Arshad
Greenhorn
Posts: 12
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gregg Bolinger! The scenario on which i m working is that some desktop application written is JAVA provides some information to the web page and web page responds on the base of that information. this information is like some thing which relates to the local machine on which desktop application is running. I am trying to find a better way of implementation which should be secure and easily implementable on several machines.
I also viewed the Gears and HTML5 'data storage on local machine option' but i think it unsecured and complicated.
Have you any better solution?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Naeem Arshad wrote:Gregg Bolinger! The scenario on which i m working is that some desktop application written is JAVA provides some information to the web page and web page responds on the base of that information. this information is like some thing which relates to the local machine on which desktop application is running. I am trying to find a better way of implementation which should be secure and easily implementable on several machines.
I also viewed the Gears and HTML5 'data storage on local machine option' but i think it unsecured and complicated.
Have you any better solution?



No, I don't. I really don't understand. When you say your desktop application provides information to the web page, how does that happen exactly? Does the desktop application send data to the server via a URL Connection of some sort or what? And what, exactly, are you wanting the web application to do for the desktop?
 
Naeem Arshad
Greenhorn
Posts: 12
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are right partially. Desktop app passes the information like some URL and i want to implement that when i open my web app, browser should get me to that URL (which is provided by the desktop application) instead of my aeb-app.
I dont know it is a practicle approach. I am requestion for the confirmation of the possibility. If your answer is yes, please give me some idea of implementation.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As stated, JavaScript has high security which does not allow it to interact and read with files and other programs on the user's computer. You will need to write an applet that can interact with the user's machine.

My question is, you are running a desktop app for security to start, why in the world are you not just writing a desktop application? Web applications are NOT supposed to work this way for security.

Eric
 
Naeem Arshad
Greenhorn
Posts: 12
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric! this is my application requirement. Have you any better way to implement this scenario.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Naeem Arshad wrote:Eric! this is my application requirement. Have you any better way to implement this scenario.



Find a new project. lol

Have fun writing an applet.

Eric
 
Naeem Arshad
Greenhorn
Posts: 12
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear what kind of applet?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Naeem Arshad wrote:dear what kind of applet?



An illogical applet?

Do you know what an applet is?
 
Naeem Arshad
Greenhorn
Posts: 12
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there anyone here with enough familiarity with the Gears code-base
to give me an estimate of the effort required to bring Gears up to
date?
 
reply
    Bookmark Topic Watch Topic
  • New Topic