I've an the Eclipse IDE with android sdk as I am an android developer. I want to develop a simple java desktop application consists of splash screen and a login screen which is connect to MS SQL through JDBC. Now, how will I enable my Eclipse to let me develop java desktop applications. or shall I use net beans. I have also downloaded the netbeans 8.0 but it not showing me the java desktop application. Also, I have installed and unzip the JDBC driver,there are 2 jar files sqlJDBC and sqlJDBC4. Please kindly tell me which jar file shall i use.
Eclipse IDE with android sdk have Java already installed. I use the same eclipse for my Android and swing development. Just go to File and create a new Java project. See the screenshot of my eclipse for better understanding:
Since you've been using Eclipse with Android SDK, you probably have Java already installed and you don't need to worry about downloading extra libraries to use the Swing framework.
To start in Swing, take a look at the official Swing tutorials to learn how to develop desktop applications. After you've learned the basics, try to incorporate JDBC drivers to connect to your SQL Server.
You should add the sqljdbc4.jar Class 4 JDBC file to your Java Build Path to make a connection to your SQL Server.
Since you will be building desktop applications, you will most likely need an IDE which allows you to visually build the UI. This usually makes development quicker.
That being said, unlike Netbeans, Eclipse does not come with a GUI builder out of the box. You will need to find and install a plugin which works for you (check here for some of them, if you are using Swing).
In Netbeans, you should be able to simply create a Java Application to which you add JFrames and other UI components.
That being said, the Swing platform is giving way to the JavaFx platform, so if you are building something from scratch, I would recommend you give this a look since it should offer a richer way to build the User Interface.
Related
Is it possible to get a good preview of the java swing application without running it repeatedly in IntelliJ? Whenever I modify code I have to run it again and again so that it looks good.
It also generates a bunch of classes that I don't really need since I'm committing to a GitHub repository How do I do this?
I don't know about IntelliJ, but Eclipse has WindowBuilder, a visual designer and development tool that supports Swing. You can install it into a variety of Eclipse releases, I don't think it comes pre-installed in any of the Eclipse packages.
eclipse and NetBeans does have some WindowBuilder future
if you are using eclipse download this
and if you are using Netbeans it does provide a WindowBuilder itself so read this article
A couple of years ago I started an open source project that used javaFX + jdk8 to create a desktop application for windows. A few months ago I decided to continue improving the project and make it a little more professional and easy to work on. For that, the first thing I did was migrate to JDK 11 and include Maven. Right now my project starts up and works fine in the IDE. But I am finding it very difficult to compile and package it.
A few months ago, I created another desktop application with javascript and electron. I loved that with a couple of commands, the application compiled and packaged automatically for windows, mac, and linux.
I am trying to do something similar with my java application. That is, use some tool that allows you to make all this ready and automated. I don't know if Maven has these features or if I need to use other tools. I know there are solutions like "launch4j", but what I'm trying to do is create a system that does everything with a couple of commands. The idea is that anyone who downloads the project will have it easy to package the applications.
So the question would be, now that I have a working project, what system do you recommend using to package my project? Which way should I go?
The way to go with this is use the jpackage tool which is made exactly for this. Here is a tutorial which explains how to use that with Maven. https://github.com/dlemmermann/JPackageScriptFX
I need to create an installer for my java desktop application. I don't like to code an installer by hand. is there anyway I can create an installer for Java applications?
If your looking to create an installer for windows applications check out Advanced Installer. For linux based machines, I'd just got with the regular tar.gz file and a README file.
Pack Jacket software:
This is a freeware with a simple GUI. Available to download from sourceforge. This file is capable of creating installers with extensions .exe, .jar and much more. The complete tutorial is available in youtube. Just search "How to make installer for regular java project" in youtube and the first result, you will find the tutorial (I tried to paste the link here, but stackoverflow didn't allow it :( ).
IZPack:
IZpack doesn't have any GUI, just some files. You have to do it manually. It takes xml files as parameters which instruct it how to create the installer. The tutorial for using IZpack is here. I am using IZpack and personally I like it more than pack jacket.
There are more apps for creating these installers, but according to my knowledge these are the most famous because I have seen these installers in number of applications I have used.
Hope you can make your work easy by reading this :)
..installer for my java desktop application.
Deliver it over the net using Java Web Start.
Java Web Start (JWS) is the Oracle Corporation technology used to launch rich client (Swing, AWT, SWT) desktop applications directly from a network or internet link. It offers 'one click' installation for platforms that support Java.
JWS provides many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions..
I've been assigned to develop a software on Linux, opensuse 11.4. Now the issue is that I'm a Java developer and I want to make that software on Java. Can I use Eclipse IDE for this software? It will be a desktop application on Linux. If Eclipse supports this type of development, what plug-ins do I need to get it started?
Plus I need to use some library routines as well. Can I do all this using Java and Eclipse IDE and some additional plug-ins?
Any help would be highly appreciated.
You may not realize it, but there are two distinct parts to this question. The response depends somewhat on whether you've already decided what GUI toolkit to use. The two obvious choices for a Java app are AWT/Swing (Java's "standard" GUI frameworks) or Eclipse's SWT/RCP. You see, Eclipse is more than just an IDE, it's a platform on which you can build applications. Here is the official description, and here is a very good intro and tutorial. Of course has plenty of tooling built-in to help you develop an RCP app.
If you're looking to stick with AWT/Swing, then Eclipse also has tooling to help with that. Specifically, WindowBuilder (WB) is included in the Eclipse IDE for Java Developers package that you can download. WB helps a lot in designing and implementing your GUI.
Java is (almost) write once, run anywhere (WORA). Thus any Java program you write should be able to run on any architecture and operating system that supports Java. In other words, you don't need to do anything extra to make your program run properly on Linux.
Eclipse can package your application in nice JAR files and the like which can be distributed to any OS.
Just download Eclipse IDE for Java Developers. You won't need any plug-ins.
I have already developped a Java project using Eclipse.
Now I would like to integrate an help system to allow the user to open a guide.
Browsing other questions i found this tutorial to set up Eclipse environment in order to use the Eclipse Help System. Anyway, this tutorial and all documentation I found since now, only explain how to use this system creating a new plugin project.
But what about if I want simply add the help system to an existing Java Project created in Eclipse IDE?
Which step should I follow to update my project configuration?
Is it possible to integrate Eclipse Help system, without using eclipse?
No, the help system you point to is an eclipse plugin based system, useful with RCP programs. See http://wiki.eclipse.org/RCP It will only run in the context of an RCP application.
You might be able to write an RCP app that contains only help, launch it, and communicate with it through http from your java app, but it's not a simple integration ... and you still have to build your help documents so that org.eclipse.ui.help can see them.