Java EE -- Configuration issues for a beginner - java

all. Relative rookie here who has spent the better part of three days just trying to get started with Java EE, and it's driving me up a wall. I've already read through numerous tutorials and consulted several book, so now I am turning to you.
I am starting from complete scratch, having uninstalled NetBeans and Glassfish and the Java EE SDK. My main issue is quite simply configuration. All the resources I've found typically say in a mere throwaway line: "Once you download the SDK, you must configure your environment for Java EE." But HOW? I need it in plain English. Even the most novice guides leave this basic stuff out. Does this mean editing the JAVA_HOME path or what? How does this configuration relate to the Java SE already on my system? Furthermore, I assume I don't need to also download the JDK with EE since I already have a JDK? (I am a Mac user, if that matters.)
I know I have a long, long way to go, so I appreciate any help I can get as I try to get this ball rolling. Much thanks in advance!

I think if you are using Netbeans then you don't have to worry about these things....
Simply File > New Project > Java Web > Web Application will help you get started with web applications..

Normally you would want to set the Java Home path so when you are compiling and running code your JDK is recognized. Sometimes IDEs come with their own JDK and then it really does not matter. However here is how you would set the path in different OS.
http://java.com/en/download/help/path.xml
For MAC I recommend this tutorial
http://lindaocta.com/?p=38

Make sure your JAVA_HOME is set in environment variables (just downloading SDK is not enough, you need to setup), I don't know how to do it mac, but in windows we setup my right click mycomputer-->Advanced-->Environment variables
Then install Netbeans, this step automatically searches for JAVA_HOME and assumes that SDK for all purposes. Then you are all set of programming.

If you don't mind switching to Eclipse can I recomend this tutorial An Eclipse / GlassFish / Java EE 6 Tutorial ignore the referance to Azzyzt tools and run through the tutorial step by step using GlassFish Tools Bundle for Eclipse.

Related

how to implement an automatic packaging system for a java desktop application

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

Which JRE should I use for a stand alone application?

I've taken some java classes to learn programming, but I haven't actually built a fully functional java application. I want to build a fairly simple form-based application for my own uses on a single pc with a MySQL back end (using Eclipse as the IDE). So, I went to create the new project and I'm a little stumped on which JRE to choose. And a quick Google search just confused me more. There are 3 choices:
1. Use an execution environment JRE (with a list of options that seems to default to OSGi/Minimum-1.2
2. Use a project specific JRE (has a dropdown with a single option: 'jre1.8.0_31')
3. Use default JRE (currently 'jre1.8.0_31')
Does it matter which JRE I choose? I don't want to go through the process of building a whole application then discover I can't run it as a stand alone application because I chose the wrong thing here.
Sorry about my noob question, but I'm just trying to get up and running and then hopefully I will be good to go.
If you are willing to develop your own applications, consider using JDK instead. It will as well provide you support for running applications.
I am currently using build "1.8.0_144"; however, you can get the latest release at Oracle's web page

can't install sailfin on eclipse

I am trying to build a conferencing application with Java under the IDE eclipse Juno. The API I thought that could help me is sailfin. But whenever I try to install it, it doesn't create the sailfin directory he is supposed to. Therefore I cannot proceed and still stuck at that point. I installed the latest version of ant and set up everything according to the tutorial but still it won't work. If anybody has an idea or experience the same difficulties before, it'd be grateful if you could provide me with some insights/ideas on how to get around the situation or maybe suggest another API I could use.
Thanks in advance for all your contributions and time.
I implemented intelligent sip server for the engineering project in 2009 and at that time i also tried to use eclipse to run a sailfinn but can not get success. So i completed project with NETBEANS. It was good with NETBEANS because glassfish is the embedded server and sailfinn depends on glassfish arcihecture. Try Netbeans.

Java EE SDK for mac

After spending 3 solid days on this with nothing to be happy about. I'm being freaked out already. I'm a newly in java and just about getting it rolling in java ee...
Please, good people here. I am confused. I am looking for Java EE 6 SDK for mac os x lion 10.7.2 64bits.
I found on oracle's website java ee 6 sdk for unix and windows and no mac... spent tons of time on google and apple's website forums and support but found nothing pertaining to this.
Is it that mac does not need Java EE 6 SDK? or what? I already have netbeans installed and eclipse as well which I've been using during my early beginning stage in java SE.
Can anyone help?
Thanks in advance!
Mac is the Unix, did you tried shell script they provided?
Java EE is an API, not a complete implementation ( that is provided by your application server where your code is deployed to).
Hence you just need the API jars. This can, however, be avoided if you get the Netbeans+Glassfish bundle, and let Netbeans do the work by choosing an appropriate template when creating a new module.

Need Help in Running My Java App

I had created a Java Swing Application, I want to run my applications, in all System, Suppose if a System, does not have JRE, then i have to install JRE using Installer in program without aware of the user knowledgeable that the JRE is installed.
There were a few projects for doing this, but from what I can see they all fizzled out - bottom line seems to be that you need a JRE - especially for swing
The best solution is not to try and install anything silently, but instead to assist the user to install Java. Oracle's deployJava.js was designed to do just that, before embedding applets or launching Java Web Start applications.
While on the subject of JWS, it is also a good choice for installing/running & updating Java rich client (e.g. Swing) apps. on platforms that support Java.
You can generate an EXE out of your Java source but you will still need the JVM to run it on the destination System. So its not real native.
There is no workaround for running non native class files reliably or really at all without the JRE.

Categories