Create a Firefox plugin that interacts with our java application - java

I have a java application that i made which stores the contacts to a web server and connects through apis to import send mail and so on.
I was thinking if there was any easy way to call my classes from a firefox plugin and send email etc.
I dont want to go very deep if that is alot of trouble i currently know Java, C, JavaScript, PHP.

I never used it, but there's information on MDN on calling java code from a firefox-addon.
See it here : Java in Firefox Extensions

Related

What is the alternatives for Java Applet to launch client programs using Chrome browsers?

I am working in a web application using ASP.net and C#.
My target is to check on a desktop application on the client machine .. If it was exist then I should launch it. Else if it wasn't exist, we should download, install and then launch it.
I could develop this module using Java Applet but unfortunately, Google decided to disable NPAPI in September 2015, So the applet will not working on Chrome.
My question is about the Applet alternatives to help me implementing the above scenario ?
The only (semi) viable option as far as I can see, is to offer the Chrome user a link to a JNLP file for a desktop application. Then when/if the JWS desktop application starts, have it report back to the server 'loaded OK' and then 'target app. installed/not installed'.
On your server, have a time out for waiting on the client to report back. If it passes that time, presume the client machine does not support Java at all and the user is checking some web service to try and figure out what app. opens a JNLP!
After searching about the most suitable way to achieve my goal, I think using custom protocols will be a nice solution to access my client applications from the web page.
This solution is used by many companies such as Microsoft (using mailto: to open Outlook application) and Apple (using itms: to open iTunes application).
The following link is a very good link which talk about a custom protocols:
https://support.shotgunsoftware.com/entries/86754-How-to-launch-external-applications-using-custom-protocols-rock-instead-of-http-
Once Google Chrome was the first to announce that they won’t be supporting NPAPI anymore, they were also the first to provide a new architecture in order to rewrite your code to work on their browser. You can take a look on Native Messaging, which “can exchange messages with native applications using an API that is similar to the other message passing APIs”. The problem is that this approach only works on Chrome, is not something that you can adapt to other browsers.
A more useful approach is FireBreath, a browser plugin in a post NPAPI world. Check the words below from one buddy of the project:
“FireBreath 2 will allow you to write a plugin that works in NPAPI, ActiveX, or through Native Messaging; it’s getting close to ready to go into beta. It doesn’t have any kind of real drawing support, but would work for what you describe. The install process is a bit of a pain, but it works. The FireWyrm protocol that the native messaging component uses could be used with any connection that allows passing text data; it should be possible to make it work with js-ctypes on firefox or plausibly WEB-RTC or even CORS AJAX in some way. For now the only thing we needed to solve was Chrome, but we did it in a way that should be pretty portable to other technologies.”

Using parse.com in a java desktop program?

I have an android app, made in Java using eclipse. It receives push notifications from parse.com just fine but now instead of logging on to parse.com to send the push notifications, I want it to be possible to send notifications from the server (without using a webview; the server is a desktop program in Java).
Can I somehow use the parse SDK in a desktop java program or is there another way to do this? Any help would be great!
PS I googled thoroughly and the docs don't cover java programs (only android).
As far as I know there is a open source library namely Parse4J where you can use your server with integration of it. Actually, it uses parse REST API as underlying architecture. Parse4j currently does not support sending push notification. However, you can write the send push procedure as cloud function and you can trigger from your server via Parse4j. This actually solves your server send push capability.
Hope this helps.
Regards.

Easiest way to establish data communication from Android to a Eclipse program with WLAN

Now, I have some problems here:
I looked several times in Google and so on, but I can't find an "easy" way to get this done. And currently having a migraine... not helping me... though
I have a java eclipse program (Swing application to be a "controller" for production-machines).
I need to design an Android app, which needs to take data from the eclipse program in a wireless network (and also send them back).
Just found solutions like JPARSON or setting up a real server, but that is way too complicated... i don´t need?! (or want :D ) to set up a whole website with php or something...
Can someone of you help me out with a better solution? It doesn't need to be code-specific, I just want to exchange like 10 strings for these machines.
If you want to exchange data you need a communication medium. The easiest way to do this is via TCP/IP protocol suite. If you decide on having a Server-Client architecture, your serwer has to listen for what phones have to say. He can do this by listening on specified port and you would have to handle "protocol", or you can use somewhat easier approach which is to write php script, or Java Servlet. PHP script is easier becaouse there is like a gazzilion php hosting providers and it's cheap. If you would like to write your own serwer, you wold need some sort of Virtual Private Server, and deploy your app there. Plus it would be helpfull if you explained a little more your environment and what you are trying to achive.
There's built in httpserver http://docs.oracle.com/javase/6/docs/jre/api/net/httpserver/spec/index.html so you can easily implement a simple webservice in standalone java. Then just use URLConnection from android to post/get data, probably in json or your own format.

Bluetooth from a webpage

Is it possible to have JavaScript which calls a Java file (or something of the sort), so we can connect to a Bluetooth device and send it commands from a web page?
If it is possible, what are some ideas behind it that I can use to get it working?
Sorry for my poor language, I am not really sure how to word it.
Java can be used to send files via Bluetooth, and there is a tutorial on it at http://today.java.net/pub/a/today/2004/07/27/bluetooth.html
You could run a Java applet from the web browser that would use Bluetooth, although it would probably come up with a warning asking if you want to give the applet access to the files on your computer. JavaScript, however, would not be necessary, since an applet can run directly on a webpage.

implementing a AJAX chat site

I want to implement a chat site with following features:
Direct one-on-one chat with a randomly picked stranger
If my conversation partner gets disconnected, I should be shifted to different stranger
In short, I want to imitate http://omegle.com/
Which language is best suited to this task? Jsp and Java? PHP? ASP? Others?
Should all of the messages go through the web server, or is there a better approach?
You may want to look into Google Web Toolkit (GWT). Ryan Dewsbury's book "Google Web Toolkit Applications" actually runs you through the process of writing a basic chat application.
GWT lets you write Java code that is compiled into Javascript for AJAX applications.
I wrote an AJAX Chat tutorial years ago at:
http://www.dynamicajax.com/fr/AJAX_Driven_Web_Chat-271_290_291.html
I also did a JSON version of it too:
http://www.dynamicajax.com/fr/JSON_AJAX_Web_Chat-271_290_324.html
Those are written in PHP but the back end is really simple so you can port it to whatever language you want easily. Here's a version that I converted to ASP.NET
http://www.dynamicajax.com/fr/AJAX_Web_Chat_ASP_NET-271_290_328.html
It works pretty much like Omegle, all you need to do is setup the code to randomly select a stranger.
I recently created a chat script using PHP + AJAX. Yes, all of my chat messages went through the server because it used AJAX and server-side PHP scripting to deliver the messages to the recipient(s).
For an example of a PHP chat script, see:
http://www.phpfreechat.net/

Categories

Resources