Results 1 to 17 of 17
- 07-15-2011, 05:14 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 16
- Rep Power
- 0
Newbie wanting to create a desktop application with Java. Possible?
I am a newbie with Java trying to create a desktop application and I'd like to know what databases Java supports or how does Java read and write data? Can you create a setup disk with Java and give it to someone so they can install a working program on their computer in one step?
- 07-15-2011, 06:06 PM #2
The requirement for java apps is that java must be installed on the PC.
Given that, then copying a jar file would install the program if it was completely contained in the jar file.
- 07-15-2011, 06:20 PM #3
Member
- Join Date
- Nov 2010
- Posts
- 16
- Rep Power
- 0
So you're saying if you wanted to write a program like QuickBooks in Java, that Java would have to be installed on the target pc in order to work?
- 07-15-2011, 06:28 PM #4
The target PC would need to have a version of the JRE installed to be able to execute java programs.
If the program requires other libraries, they would also have to be on the target PC.
- 07-15-2011, 06:33 PM #5
That's super easy. Make sure you download the latest JDK (this will allow you to compile and debug your application in an IDE and it has a JRE built in - JRE is Java Runtime Environment. Then once you can run your program export into a JAR file (Java ARchive) and those are fully executable. You can send these files and as long as the user has the same JRE or later on their machine they can run the program. You also must specify when creating the JAR File where your entry point in the program is. Usually that's where your static main() resides. Good luck, it's such a fun thing, Java.
- 07-15-2011, 08:02 PM #6
Member
- Join Date
- Nov 2010
- Posts
- 16
- Rep Power
- 0
What kind of database do you use in your apps?
- 07-15-2011, 08:08 PM #7
I don't use databases.
- 07-15-2011, 08:29 PM #8
Member
- Join Date
- Nov 2010
- Posts
- 16
- Rep Power
- 0
What do you use to store data?
- 07-15-2011, 08:35 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,375
- Blog Entries
- 7
- Rep Power
- 17
I normally abstract (as much as possible) the particular dabase from the code. Java has DataSources as well as DriverManagers that allow you to create a connection to any database that implements a JDBC driver. Since Java 1.6 (or was it 1.5?) the JDK comes bundled with a nice rdbms, JavaDB (or alternatively named Derby) created by the Apache foundation. It doesn't cost anything and is a very nice place to start.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 07-15-2011, 09:11 PM #10
Member
- Join Date
- Nov 2010
- Posts
- 16
- Rep Power
- 0
When you abstract your database does that mean you do or do not use JavaDB/Derby?
- 07-15-2011, 11:47 PM #11
Neither. He can use any database with the same code. The JDBC driver acts as an interface that is known by (implemented by) many databases.When you abstract your database does that mean you do or do not use JavaDB/Derby?
So your code doesn't depend on databasespecific commands.
Compare datasource with foodsource. A cow is less abstracted from its foodsource then you are. A cow has only the "commands" to digest grass, you are implementing cakedigestion, breaddigestion, meatloafdigestion and potatochipsdigestion (but don't try grass). With such an JDBC-like interface the cow could use all those tastfull foods, and you could use grass.
(Sorry Jos, I figure you could have explained it yourself.)Last edited by Jodokus; 07-16-2011 at 12:43 AM.
No bug ever had to calculate its fitnessfunction.
- 07-16-2011, 12:17 AM #12
Member
- Join Date
- Nov 2010
- Posts
- 16
- Rep Power
- 0
What's the catch? I've been learning Visual Basic .Net for the last 10 years.
- 07-16-2011, 12:32 AM #13
Do you mean I told you nothing new? You really asked what abstracting from a database means. You could have asked what database he uses. But sorry if I offended you. This is "New to Java", so you expect newby-questions.What's the catch? I've been learning Visual Basic .Net for the last 10 years.No bug ever had to calculate its fitnessfunction.
- 07-16-2011, 12:48 AM #14
Member
- Join Date
- Nov 2010
- Posts
- 16
- Rep Power
- 0
You did not offend me.
- 07-16-2011, 01:17 AM #15
Thank god (or spaghettimonster or whatever)
.
Last edited by Jodokus; 07-16-2011 at 01:24 AM. Reason: Added missing smiley
No bug ever had to calculate its fitnessfunction.
- 07-16-2011, 07:33 PM #16
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,375
- Blog Entries
- 7
- Rep Power
- 17
- 07-17-2011, 12:10 AM #17
Similar Threads
-
Book about a java desktop database application
By jcd21 in forum New To JavaReplies: 3Last Post: 04-04-2011, 11:24 AM -
creating java desktop application
By highfive in forum New To JavaReplies: 2Last Post: 03-29-2010, 04:14 PM -
Help in converting Java application to desktop application in Netbeans
By realahmed8 in forum AWT / SwingReplies: 3Last Post: 12-04-2009, 12:10 PM -
Anyone know how to create a URL desktop shortcut from java?
By IYIaster in forum New To JavaReplies: 0Last Post: 08-18-2009, 04:50 PM -
Installer for Java desktop application
By nitingupta183 in forum SWT / JFaceReplies: 0Last Post: 03-18-2008, 07:53 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks