I really don't know what I'm doing, and have been trying to learn about it, but I figured I would ask for help; I have a java server (essentially the one here: http://www.akira.ruc.dk/~keld/teaching/OOP_f02/Book/chap09/BroadcastEchoServer.java, just playing around with stuff so I can learn about it), and I want to be able to run it on the internet , so with the client applet I wrote that you can embed in a browser, say, you can connect to it from different computers. I really have no idea how to go about it. I downloaded some things (Tomcat, Glassfish), signed up for google app engine, and something I think is similar specifically for Java, but I'm not really sure what I am doing. I am thinking I get j2ee or something? I use a mac and xcode, if that's useful at all.
Thanks in advance
Oh, the client applet is like the one from a java socket tutorial here:
java.sun.com/docs/books/tutorial/networking/sockets/readingWriting.html
If your server is already working locally, what you need to do is to put it in a hosting service.
That way it can be accessible by everyone else.
That server, is an stand alone application ( that is, it doesn't need tomcat or glassfish, and certainly won't run on Google App Engine )
The only thing you need to do, is have it install it in a machine which is accessible from the internet. How to host an application is out of the scope of this site though.
Related
I have a java application that uses swing and I would like to share it on my website, so that users who have no JRE on their computers can open it.
First, I naively thought that a link to download a .jar was enough but now I realize that it needs a JRE to be launched properly.
So then, I looked for other solutions and I searched information for the applets, until I understood that it was now obsolete.
Eventually, I tried to understand that Java Web Start thing but I am completely lost, as it needs several files to be created and to setup the server. The tutorials I found weren't very clear... As I am an Eclipse user, I tried to look for a plugin that would do this automatically but I cannot find anything.
Do you know a plugin or is there a simpler possibility to share this very simple java application in a website ? Or do I have to try and try again to deploy my application through Java web start.
Thank you for your answers :)
I was wondering if it's possible to send commands from a website to a java program being ran on a computer.
Basically what I'm doing is creating a robot, but I want control over it when I'm away from my computer. So what I was thinking, was that if I could send it commands (Like 'Stop' or 'Start') from a website, I could use my smartphone to control it.
If you know a way that might work or another method that's similar please let me know, thanks!
What I've done in the past is built the Java robot into a Java EE webapp, then deployed the webapp on Tomcat. Tomcat is a Java-based web server. It's a web server, but there's also no reason you can't run arbitrary code inside it, like a robot.
Another alternative is to embed a web server into the robot, and have the robot serve up pages itself. An example of an embedded HTTP server is JETTY.
Using the above two approaches, the web pages and Robot can communicate with each other directly through Java code. It's a single process and a single JVM running both.
A third alternative is to connect the Java robot process with the web server process via sockets or another form of IPC. This could be tricky, but decouples nicely.
one starting point is:
RPC the wikipedia article will guide you through other options and names that can help you. If it is really that basic. Socket Programming is the right way.
I was wondering if it's possible to send commands from a website to a
java program being ran on a computer.
This equivalent to asking if 2 programs can communicate via network.
The answer is yes. It is obvious, right? I mean how do you connect to your website in the first place? Eh?
It's my final year project, which i'm making using java, and i have to develop one online attendance system for faculty and student. For faculty login, i need fingerprint login authentication, so i googled but i didn't find anything helpful in any case.
During my research, i found these sdk neurotechnology, grfinger. But, i'm very confuse how to use these on my web application. My laptop already have one fingerprint hardware, which uses authentec driver for windows login.
Please anyone help me to use my embed fingerprint reader for my web application. Thanks in advance !!
If there is any alternative for fingerprint login authentication (without using fingerprint reader hardware), in which we can just comparing the fingerprint manually, that can also useful for me. !!
It seems that you will need to use a signed Java applet for this. You might want to check this previous SO thread in which something similar to what you want is being discussed.
That being said, you might also want to take a look at "Why is your desktop app not a web app?". In your case I think it should be the other way round but I think that it might outline some points which you might find useful.
That being said, you might want to opt for a desktop application which could have it's own web browser, such as Lobo so basically your Java application which is running on the client machine handles the authentication and then, it uses its built in web browser to do whatever it needs to be done.
EDIT:
I have never used biometric locks, so unfortunately I might not be able to provide much help on the topic. As I said earlier, a Signed Java applet should have access to your client devices. If you have limited knowledge, I would recommend you build some simple desktop applications so that you can get it to work. Once you do this, you can migrate everything to your applet. You can check out this tutorial on how you can then include your applet into your web application. The tutorial uses Netbeans which in my opinion is a pretty good IDE.
I would recommend you look at some tutorials first to see the possible ways in which you can accomplish a given set of tasks. Once that you have found a way or two, you can then choose the best way which you can get them done.
I plan on making an instant messaging app on Android and iOS, where you can chat to other people with the app, along with some custom features.
I’m going to use the XMPP protocol, and make a custom extension for it. I plan on making a Java application running on Amazon Web Services (AWS) so it's scalable.
After researching server options I’ve decided to use Apache Vysper.
However, I’ve never made a proper Java application before, and have never used XMPP, AWS or Vysper – so I’m rather reliant on good documentation :-)
The Apache Vysper project is very new and so the docs are a bit sparse. I was wondering if I was missing something, should I be using the general MINA docs as well? Are there other resources
elsewhere I don’t know about?
“Apache Vysper can run stand-alone or embedded into another
application.”
To be honest I’m just as lost when it comes to working out what to use to make a Java application anyway. Do you know if the AWS Java SDK has everything I need to make an application to use on AWS? And then is it a simple matter of integrating Vysper into this? Or do I need to make a Java application using something such as the Spring framework?
Thanks for taking the time to help me. If you know anything that could clarify the situation I would really appreciate it :-) --and sorry be being a bit useless, but hey, we've all got to start somewhere right ;)
First of all, as the founder of Vysper I apologize that the documentation is lacking completeness.
To answer your question(s).
Most Java applications bring their own ready-to-go start scripts with them.
Vysper is no exception. You get the pre-packaged download here:
http://mina.apache.org/vysper-project/downloads.html
Ok, before running it, you need to have Java installed, whether you're on your own machine, AWS, a server or a virtual machine anywhere else. Get it from Oracle, or use the package management of your Linux distribution. Make sure that after installing Java, you can execute "java -version" on the command line and you are all set.
Then, unpack the Vysper download, change to the bin/ directory and execute "run.sh" or "run.bat", depending on your OS.
Please note that support for Vysper - besides here on StackOverflow - is available on the MINA user mailing list here:
http://mina.apache.org/vysper-project/mailing_lists.html
I am working on a Java program that has bunch of classes consisting of dialog boxes, JFrames, etc.
Can someone guide me where I can learn how to transform it to an 'applet' kind of. ( I don't even know if applet is the right word)
Like for example, can it be accessible through the internet browser. If I somehow make a domain www.myjavaprogram2011.com it would be nice if it will take it straight to the java program I coded. I see this as anyone can come to this website and use that program.
Thanks!
You may want to look into Jars for distribution or probably more aptly Java Web Start as this allows Clients to be downloaded and run.
Java Applets isn't your best bet as there's lots of security permissions that you need to worry about as well as your jars needs to be signed (especially for client/server data access).
Try using Java Web Start, it will allow you to launch fully-featured application from the Web Browser. Oracle has tutorials on deployment of JWS, etc.
Sounds you're looking for some kind of RIA technology. Have a look at JavaFX, though it's not mature yet IMHO.
Ah, but then, if you already have a Swing application then this isn't an option probably.