deploying a java SE application in Netbeans8 - java

I have built a GUI application in Java using Netbeans 8.0 and have linked it to a MySQL database on my system using JDBC.
This application provides login functionality to its users and lets them take a survey.
My problem is to host this application on the internet and collect the data filled by users in MySQL database.
Can someone please suggest how to go about this??
I am a newbie and have tried using java web start to make this work.But no success yet.Please suggest how should I go about this.I'm saturated with all the googling.

I don't get what your problem is. Normally a GUI application is a program which can run on a desktop machine. If I understood well, you want to create something which connects to a remote database. You can do this with your application but you need to distribuite it along the users. If you want to run a java code on host so that people can use it in internet like a webpage you need one of these:
applets
a webserver capable which can run java and jsp/jsf or whatever
If you can be more specific I can help you in a better way.
Cheers

Related

JavaFx application with database executable

So, i've just finished a small javafX application, with database and stuff... I used Netbeans and SQl developer, now i want to export my project so i can use it anywhere i want; any computer, So, i've tried some programs like Launch4j or something... but the main problem is, even if i make the .exe file, what's gonna happen with the database? it's located in my PC, so if somebody try to use my application, he can't access to the database, so the application won't work...
In other words...What is the solution that i can use to like "Combine" the database with the application, if it is possible? or create the .exe file with the database... I hope that my problem is clear, and thank you for your answers .
as per my understanding you can do two things.
You can deploy or host your database to any online server and create some web services to fetch and insert data to your application.
You can create one startup class to create database but here you need to use lite version of database like sql-lite.
if you need more information about sql lite then click here

How to make laravel executable using Java?

Any Idea/Suggestion how to wrap laravel so it becomes executable with Java Program?
So the idea is I'd like to create a GUI using Java for doing laravel command like serve, queue:work, migrate, etc. Thus the threads/processes are handled GUI-ly by Java.
But as we know, laravel requires so many prerequisites to be installed first, for instance, PHP and mySQL.
Wouldn't it be great to provide a GUI to control all of that? So all the administrators need to do, just extract my app, open the java GUI app, click start button, and voila! it's served.
Thank you in advance!
RESOLUTION:
Developing another app to run a standalone webserver is almost impossible if not impossible. So I decided to create a VM to run everything.

Run remote app but not the entire desktop

In the company where I work we have, among others, an application made in Java running on two places (let's say Merida and Coatza) and both have different databases. The users from Merida only occasionally used the program to get some info or capture things. Now the company owner decided to control almost everything from Merida but we cant get the databases merged due to operation logistic.
The thing is that when the application uses the persistence-unit to connect coatza it's incredibly slow since the app its not prepared to use remote databases (at least not with a high performance).
I thought of something like teamviewer to run the app remotely but not the database, however I don't want to run the complete desktop, only the application. Or develop a part of the program on JCurses so it can be run from coatza but there is not enough documentation and we use a lot of tablemodels.
Is there something I could do?
The application is a DesktopApp. We use Jboss 5 as server. Hibernate and JPA.
I had a similar situation where we needed to use the same application at different locations because the license was too expensive. I used a feature called RemoteApp on Windows Server 2008. The best part is that you can have a desktop shortcut for any app on a remote computer and all you need to do is open it and login and only that particular app starts running instead of the whole desktop. There is also a web interface for remoteapp so that you can simply login and select whichever app you want to run. For more details take a look at http://www.techotopia.com/index.php/Configuring_RemoteApps_on_Windows_Server_2008

How to start a local port on user's computer (Edited question)

sorry in the past I have not been able to formulate my question coherently. This will be my last try. =|
Basically, I want to do something like this website is doing: http://www.ninjavideo.net/video/56388. They are rendering an iframe that points to a port on localhost. You will see nothing in the iframe if you dont have their applet running (which can be found here: ninjavideo.net/applet.php ). I want to write a script that does something like what applet.php is doing, but I don't think they are using only php code as it won't run on computers that don't have php installed. Do you suppose they are using Java/C to do this?
Thanks for all your suggestions.
An Applet is basically a piece of Java code which is served by a webpage and is supposed to run at the client machine. You can learn more about Applets at Sun's own Applet tutorial. If you're green to Java as well, then I recommend to go through Trials Covering the Basics first. Opening sockets (ports) using Java code is covered here.
That PHP script is just serving the applet code from the server, so that the client can download it.
You could do this in PHP using a ready-to-run Apache setup (there are some that are ready to run from a USB key, should be possible to make into something that a client can install, but is complicated, see e.g. this tutorial) or a product like NuSphere Dock:
PhpDock is a deployment platform for PHP applications.
PhpDock enables you to deploy any PHP web application as a Stand Alone Windows Desktop application w/o any changes in the code.
PhpDock combines NuSphere's powerful embeded Srv webserver and browser components.
I would usually say that if you are looking to build a Windows application, you should go with a tool that is aimed at just that, i.e. C++, C#, Java, the .NET platform, Delphi, and the likes. But if you need some kind of daemon or local web server, you may actually be well off with a product bringing a web server to the desktop.

How to setup Connectivity between the web component and java app

I am confused about the approach for application that am writing. I have developed the application jar and will be distributing via java webstart.
Now i need to putup a website supporting my app.
doubts i have
1)Can i pass this username and password to the jar that i will be launching?
2)Can the webcomponent calculate the time for which the app was launched.
Basically i need to understand how will the webcomponents and my java app interact with each other in terms of any data required to pass to the app and any info retreaving from the app and putting on the web.
Thanks
Krisp
I want to pass arguments like username to the JNLP and then want to pass it to the main class.
Is there any direct way to do so rather than use database?
since JNLP is just an xml file. I could not find a direct way to do so.
Can i anybody refer me some working code example.
Database is probably your best bet for sharing data between both apps. Other options are web services, sockets, RMI, etc.. You will probably need to look into all, on the surface initially, to know what suits you best.
As for the Calculation of the time in my java app i can use currentTimeMillis() to calculate the time for which my app is running.
But senarios like app getting crashed or forced termination of the app it will not get saved.
Any Hints for communication in terms of data between the web and Application jar?
Thanks
Krisp

Categories