creating a web application from java application [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Hiii
I already have a desktop application using swings and jframes,i have to create a web application of it,wherein the gui will be of jsp,what can be the most convenient approach to do this,so that i could use my already generated code(linked classes,their objects and functions) in my new project...Thanks in advance

You can not use this directly.
you will have to create new gui for that,
you can use jsp HTML java code but not j frame in web application.

It is not possible to reuse it the way you described. You will either have to rewrite GUI, or backend, or everything if decoupling one from the other is not possible.
If I desperately needed to reuse the GUI I would have introduced a network (via an RPC, say JAX-WS) in the least contended place (draw class collaboration diagram and partition it in two halves such that GUI is on the left, backend is on the right and the number of lines crossing the cut is minimal (aka Min Cut). The thin GUI can be exposed to the client via Java Web Start.

Related

What is app control panel [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am new in android development ,My question is
what does it mean to have an android app with a control panel , Is it possible to control app after release ?
usually when somebody wants to make a mobile application, he creates a control panel using any back-end (php, java, node.js ...etc)
so he can control the API (if your app uses API call), he may also want to disable the application, so in each run in the application side, an API call will be invoked to check for availability.
you can do more complicated things but that is the basic

Will WebSocket achieve what I'm trying to do? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm creating a simple java application made in swing that communicates with a database. Multiple people will be using the application at the same time. As they are able to change things at the same time, if someone for example, adds a new user, and a different person is on that same page, I want the person who did not make the change to be notified that changes were made to the database since they last loaded it.
My lecturer in college advised me that WebSockets would be the way to go to achieve this, however after some reading about WebSockets in Java, it seems it is based to work with web browsers instead of between Java applications.
Can using WebSockets achieve what I am trying? Or, if not, what would be a way to achieve this?
Simple answer is Yes you can achieve what you needed
WebSocket is a communication protocol(#see RFC 6455) & it is not a must to use a Web browser.
You can achieve what you want to do with your app, it is just a matter of writing a custom WebSocket server to facilitate your requirements in your case sending database changes to the other clients(Which is called Server push)
There are several java libraries to get the work done,
netty WebSocket (My favorite)
jWebsocket
Atmosphere
Webbit
Netty WebSocket is a good one to start with and you can find examples in its project to write a custom client and a server

Enabling a completed Java app on the web [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am not a Java pro. I need to enable my completed java applications to ONLINE-Versions. Kindly give me the simplest way.
I have tried to go the JSP and Servlet way, but seems exceedingly tiresome,there surely ought to be a direct way.
When you use a typical web application what do you think is happening? You're in a browser and it's displaying some pages. You click around and some server does some work, for example Amazon shows you a list of books you could buy, the server is passing data to the browser for it to display.
That's a big difference from your current Java Application where everything is happening in the same computer.
This split between the UI part of the application, in the Browser, and the server part that's doing the real business is one reason why Web programming is so different from simple Java programming.
Servlets and JSPs are the traditional Java way of doing things, but modern web apps make much greater use of JavaScript for all the UI and all the Java (or any other server technology) does is provide the data displayed by JavaScript.
Bottom line: Sorry, but there is a whole lot more to learn. My recommendation would be to grit your teeth and forget about what you've done so far and start studying JavaScript and HTML.

Developing a standalone application using Java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to build an application using Java related frameworks but i do not have an idea to start it.
The description is as follows:
I need to fetch flat files containing legacy data from UI and then send it to the structured database for storing the structured data. It is basically a conversion of legacy data into structured form.
In this above process i want to display the error logs on the UI itself.
How could i achieve this functionality and which framework or technology will be better to use? Is it good to use Swing?
You could write a simple console application. If you don't need a GUI don't use one. Otherwise Swing is fine.
You can use Spring and Hibernate to handle the database connectivity.
Logging would be via Log4j which can output to Console.
It seems you have a lot of studying to do to get started.

Can you program external application from Java/C++ app.? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Can you program external application from Java app.?
I know this is a wierd question but lately I really need to do it.
So the lets say I have "VLC" player or MPC or whatever it is, I want to be able to create a Java/C++ application or whatever it is to control the application such as play the video, pause the video and stuff.
If it possible please let me know and how.
It's certainly possible with VLC. Look here: http://wiki.videolan.org/Java_bindings as well as here: how to control VLC by java
For MPC, I don't know of any resources that can be used to do so. You can at least launch it to the best of my knowledge.
To start (execute) an external application you should use Runtime.getRuntime().exec(params);
or ProcessBuilder class.
http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html
See Execute external program in java for more information.
To send key strokes to another application you could use the "Robot" class (http://docs.oracle.com/javase/6/docs/api/java/awt/Robot.html).
What is expected is to have access to interface to do these operations, you can get some references from http://caprica.github.io/vlcj/
This is java api for controlling the VLC instance embedded in AWT.
I have found this site that describes how to run external programms from java
http://www.rgagnon.com/javadetails/java-0014.html

Categories