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
Related
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
I have a Java Application, which was created in an IDE (NetBeans) (JDK 1.6). The application allows sales people to enter sales info and have the approver come in to approve the entry. Saving the entry. The application is connected to a Derby DB.
Once this application is completed, I need to be able to distribute this application to the users so they can easily access the application.
The users would obviously need to be able to run this application without using an IDE, and if possible I would like to package it with the JRE so the users do not have to download the JRE (although it is not the end of the world if they must download the JRE).
This application will have different versions as we move along so it must be a process that can be either automatically updated or easily updated by a non technical professional.
Also there is a team SharePoint page, if possible I would like to be able to wrap this in some type of .exe file and then load that file in the SharePoint page which will allow the team to grab that .exe from the page and run it from there. And therefore once a new version comes out, we can just replace the old version with the new on SharePoint.
Is there a way to do this or would my best bet be using something like Java WebStart?
Although Java WebStart sounds like a reasonable solution here (you will require every user to have the appropriate JRE), does the app have to be distributed locally ? Can't you put a web interface over it ? That would mean you'd run and adminsiter a server centrally, and you wouldn't have to worry abput distrbuting the application and/or the JRE.
If you've got a standalone app that can't be embedded within a Java EE server, you can embed a web server (e.g. Jetty) within your app and have that server up the necessary web pages.
Its possible to move my app hosted in appspot.com to another server.
If so what are the steps and requirements?
My app its done in eclipse using gae java
Thanks in advance!
It's not possible to take your code exactly as it is now, set it up in a different server and work. Even if your whole code is App Engine agnostic, your datastore models are probably not. Thus, first you need to define which is the development environment you want to move to, and then modify your code to properly work on that.
As far as your current data are concerned, you need to create a "migration tool" that will get the data from App Engine and import them to your new environment.
Hope this helps.
Google Appengine doesn't provide any controls over what host(s) your code runs on. If you've set up a paid app, you can change the memory/cpu profile on the Application Settings which could be assumed to require an instance of your app to run in a different virtual machine. You can also shutdown an instance (on the Instances page). If there are no instances running, a new one will be created on the next request, and is unlikely to run on the same virtual machine as the one that was running the app before.
I have a program that I want to distribute, without giving the source code or database used. It's an sqlite database, and doesn't need to be updated. I tried using eclipse fatjar and changing where to look for the jar, but when I run the program, it just creates a blank database file in the same directory as the jar. I just want one file that I can distribute.
From comments deemed relevant:
..include an XML after tested with a TXT file.
I would, but this database is 80,000 lines long, and has 4 columns. It's only going to get bigger too, with updates to the program, not during runtime.
Put it on a server and have a web interface.
I want to avoid using any internet connection really. If someone wants to decompile the jar, whatever I don't care. I just want it to work from double click, and no extra files laying around.
(deployment) ..usability and neatness is important for me
That makes me think that what is really needed for this is a cross-platform installer. The user gets one file and double clicks it, 'follows the prompts' (if any prompts are required) & it extracts the app. ready for use.
It might create multiple files, but this will be largely invisible to the end user. 'Out of site is out of mind'.
I want to avoid using any internet connection..
I recommend you rethink that. What size does the app. come to when Jar'd? A couple of megabytes? That is nothing in this day and age of internet traffic. That's a 2 minute YouTube.
The ratio of devices having internet connections to machines having (for example) CD/DVD drives to load software is also changing. It is coming to a time when more machines capable of running J2SE have internet connections than have drives. I have a desktop PC and a Netbook that can both run J2SE. Both have an internet connection, but only the desktop PC has CD/DVD drives.
If that is the case (getting to my point) look to Java Web Start to deploy the app. and DB. Very user friendly, with good desktop integration.
it's about 50mb, but the problem is not all end users will have access to internet at all times. Distributing the application can be done through the internet, but I don't want to rely on it for accessing the database or loading the application all together.
That is not necessary. JWS caches the application resources locally. It will check the server for updated Jars, but can be configured to allow launch from the cached copy even if there is no internet connection at that moment. The launch file element to configure that would look something like:
<update check="always" policy="prompt-run">
Don't know whether you can do this with a SQLite database, but Derby supports jar: paths: http://db.apache.org/derby/docs/dev/devguide/cdevdvlp17453.html
Alternatively, extract the database from the jar to the filesystem upon launch and point there.
I think you can do the following:
Package your database on the classpath.
When the app loads, copy the database to some temporary directory (like /tmp)
Instruct sqlite to read it from there (by setting the jdbc url)
Add a jvm hook to delete the file when the app gets closed.
That should work like a charm.
Hint:
Use getClass().getResourceAsStream(); to get the reference of the file on the classpath.
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