I am building a simple desktop application with Java Swing for the front end
and use the HyperSQL DB as the database system. I am using the Netbeans 7
IDE to develop the system.
Is it possible to integrate the HSQLDB into the Netbeans IDE
and then be able to connect the application interface to the
database?
Will be happy to have a tutorial or article about this.
Create a library entry for your database, as shown here for H2. Open the Window > Services > Database panel to establish properties for a connection and examine the available schemata.
Related
Hope you guyes very fine! Well, i like to create application with netbeans using java code. I can make simple application with mysql database. Though after "built and run" if we run the jar file it’s need to stay run mysql server from xammp or any for for database. if i'm going to run it to another computer the computer must have installed the jdk and keep run the mysql server.
My questions are:
how can i run netbeans application with database without using xammp application.
how can i make setupable application like .exe file.
Thanks regard!
you can use a different database such as SQL server also you can use MYSQL workbench and connect the database using JDBC.
Here is the answer just click and watch it!!!!
I am making a simple example Java Swing application but when I run it on another PC it shows data fine but cannot save any data and it gives this exception:
java.sql.SQLException: attempt to write on read-only database
How should I do to make it writeable. I am using the NetBeans IDE for a Java Swing app.
Just right click on your application &
Run as administrator
It is not advised to use SQLLite as a remote database.
Please see this article on appropriate uses for SQLite: http://www.sqlite.org/whentouse.html
It is recommended that you use a traditional RDBMS for this type of situation.
If you must connect remotely you'd have to use SSH or something similar. I'm not sure that this is achievable through Java.
I have a JavaFX 8 application and I am creatin an .exe application bundle to distribute the application to windows users. I am able to create an exe with SQLite as back end following here JavaFX 2 Tutorial - Part 7: Deployment with e(fx)clipse
Now I want to change my whole database to MySQL to increase performance. How can I bind MySQL with deployment package so that MySQL automatically get installed and database created in it. I have googled a lot and still i couldn't find a solution.Even in the above link,author suggested to post the question in SO.
In the interest of completeness, I am using Oracle JDK 1.8.0_45,Inno Setup 5 and Eclipse as my IDE.
Any help would me much appreciated. Thanks....
We have distributed web application and front-end part of this application should be standalone desktop application and have integration with desktop apps such as telephony. I saw Electron framework and apps (for instance Slack) built on top of it and it is pretty good.
Does Java world have such a tool for embedding of jetty/tomcat and webkit browser to built native desktop apps?
Similar questions:
Use embedded web browser (e.g. Chrome) as GUI toolkit for Java desktop applications?
Is it possible to create Desktop Application using Java backend & Web Technologies UI
Performance of WebView in JavaFX
Integrating JavaFX 2.0 WebView into a Swing Java SE 6 Application
Update:
See my test application on Java CEF: https://github.com/jreznot/cefc.
It uses Jetty/Swing/JavaCEF/Vaadin as HTML 5 Desktop Stack.
Final Update:
See my Electron+Java madness: https://github.com/jreznot/electron-java-app
It uses Electron with Java server side and Vaadin for application UI.
I recommend to use Electron instead of Java-Webkit bindings because it is mature framework and it has large community of JS developers.
I have search for similar solution in these last days and haven't found a totally fine solution.
These below is the more interesting partials solutions I have found.
Embed a browser (chromium) in java
I found two web site and is unclear what is the better solution:
jcef on github.com
build instructions
jcef on bitbucket.org
build instructions
I am not sure if these embedding solution will work well.
Please let me known if someone have found a quicker solution to embed web browser.
If you embed the browser into your code you have not trouble if the browser will update itself in the future and the user have your window container unless the standard browser window.
If you use an external browser you are sure on it well known behaviour but it can be change in the future and if this happens you have to update your application.
I choose to avoid embedded browser and reuse a standard external browser.
Embed http server
I like two solution I have found. All these solution can be use with minimal code change on your web application.
One thing is better you do is to make your web application a Maven application.
To do this in the past I have look at every library in web application class path and put in maven pom.xml dependency tree.
Spring-boot framework
Spring-boot is part of Spring framework.
It is a Spring projects: Spring-boot.
This project help a lot to start your web application.
Since you are developing a web application, you will add a spring-boot-
starter-web dependency in maven pom.xml
It standard embed server web is tomcat7/8 but you can change to Jetty8/9 or Undertow 1.1
Spark framework
This framework is a good alternative to Spring-boot. It is more concise and use Jetty as embedded web server.
I like Spring-boot because I am use to Spring configuration and use a mix of xml/annotation configuration and I like spring IoC. Using Spring-boot it easy to add other Spring constellation capability.
I hope that this can help you.
I think you can use wt. This is a system that takes a Qt based GUI application and rewrites the drawing mechanism from the usual desktop controls into html controls on a web page. IIRC its very transparent in that you only need to change a line or two of your original code. Qt is not java though, so I'm only pointing it out for completeness, its still pretty cool though.
But the simplest way would be to implement it using web technologies (eg HTML/JSP controls) so that it can be displayed as a web page easily, and then create a desktop app that uses the same html pages only wrapped as a 'executable'.
To create a desktop application you can either view the web page in an embedded browser in an application that exists solely to show the browser in a window, or you can use something like Microsoft's HTA system that presents web pages as desktop-style windows.
Credit goes to #gbjbaanb
Resource Link:
Is it possible to have a single code base for a desktop GUI and a
web application?
Run Jetty Web Server Within Your Application
Running a web application (WAR) with embedded jetty server
Has anyone out there actually gotten an existing Eclipse Dynamic Web Project working under OpenShift? Does anyone know a tutorial that ties all three title elements together?
I have the OpenShift plug-in and the EGIT plug-in added to Eclipse Kepler.
I've tried creating a new OpenShift Project in Eclipse. It does well until the final step when it errors for wanting the location an ssh "pub" file. Nothing prior had mentioned this and even if I knew where it was or what they were talking about, there's no place in any of the dialogs to enter it.
I've started any number of GIT and OpenShift tutorials or guidelines. Most think that everyone is using Red Hat Linux. I'm using Windows 8.
It doesn't appear that OpenShift will let you select an existing Eclipse Dynamic Web Project that doesn't already somehow magically exist in OpenShift.
I've read the solutions to other user's problems as supplied by Red Hat and they're all very fragmentary and tend to stipulate a degree of knowledge that the questioner simply doesn't have.
It's all been very confusing. I want to host my Dynamic Web Project on OpenShift because they support Tomcat 7, JDK 7 and MySQL 5.5, but somehow I've not found the magic bullet.
I recommend to use newer version of JBT (or OpenShift tools) - there are more and more changes over time (new features, fixes...). Newer JBT cannot allow you to start create a new application without having your public key on your OpenShift account.
According to your issue. You have to have uploaded your public ssh key on the OpenShift to successfully deploy your existing application. It's required, bcs. there is at first created OpenShift application with specific cartridge (in your case Tomcat 7) and then it is overwritten by local application (forced push) - and there is required ssh key for secured connection. That is a reason why you cannot deploy your existing application.
To upload SSH key to your OpenShift account open OpenShift explorer and choose your connection, open its context menu and choose Manage SSH Keys... (older version could have different label for this, but it would not be much more different). If you don't have any ssh key, wizard allow you to create your own key pair. Make sure, that SSH key is also added into Eclipse SSH2 preferences (I am not sure, which version of OpenShift tools do you use, if there is not link to eclipse preferences, go through Preferences -> General -> Network Connection -> SSH2).