I am very new to programming and I am using Java as my first Programming Language. I am already using Java with Java SE for almost a week and I read something about Java EE and if I understood it correctly, Java EE = Java SE + other features, so I think I have to change my SDK to Java EE to save disk space.
I read the installation instructions about Java EE and it says there that its OK to have them both but I really wanted to have just Java EE. I uninstalled Java SE and installed Java EE but I was having some errors along the way and I can't continue installing Java EE. I can't remember what the errors were but I decided to cancel the installation. I installed Java SE again and installed Java EE and everything went smoothly. Now, I have both...
I am using JCreator 5 as my IDE and I configured it to use the Java EE jdk only. I tried to compile my test program but it seems that it cannot recognize it. How can I make my Java EE work without having Java SE.
I don't know whats going on. I am totally new to this. I just wanted to use J2EE... Please help.
Java SE is in C:\Program Files\Java while Java EE is in C:\Sun\AppServer
Java EE is defined by its specification and its specification is built on top on the Java SE classes . Java EE classes will call Java SE classes , so you cannot use the Java EE without the installation of Java SE . Otherwise , you will encounter the java.lang.NoClassDefFoundError
Java EE classes are defined over Java SE classes, so you need to install Java SE, first.
Happy learning!
Related
I have checked and found that for Java 7, following holds true
Java Web Start version 1.7.0 is included in the Java™ Platform, Standard Edition 7 JDK
I got the above from oracle docs.
But the same I am not able to find for Java 8.Is there any doc on oracle or is there any way to check the version of java web start.
Thanks
Amanjot Singh
I'm going to develop a complex Java application which should run on a machine with Debian 8.6 and JRE 8u71 installed. Furthermore, the application makes use of some Java classes, developed and compiled in Matlab.
By now, Matlab (Version R2015b - R2017a) supports Java version 7u61.
So I would like to know if anyone has some experience with using Matlab and a JDK 8 installation. I know about following article:
http://de.mathworks.com/matlabcentral/answers/130359-how-do-i-change-the-java-virtual-machine-jvm-that-matlab-is-using-on-windows
but I'm not sure if this is quite a good idea. Furthermore, will this change the Java version of the Matlab Compiler Runtime as well?
For testing it is also necessary for me to integrate some Java classes (version 8u71) in Matlab.
Any help is highly appreciated.
Thanks in advance!
I've been using Matlab 2015b with Java 8 on both Windows and Linux for a while now (through setting MATLAB_JAVA environmental variable), and never experienced any issues (unlike when I tried using some older Matlab versions with Java 7). This lets you use java classes compiled with Java 8, i.e. all the fancy language features like lambdas etc.
I am just starting with the Oracle Java EE 7 tutorial. While I have already gained some practice with an existing Apache Tomcat Environment I wanted to get in touch with the complete tutorial to have a clear learning path and trail.
So I am currently using a Mac with OS X Mavericks. I have already installed an Oracle JDK 1.7 which is working pretty smooth. Developing is also nice so no problems with that.
Now I came to the part in order to download "Java EE 7 SDK/JDK" (http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples001.htm#GEXAJ)
I have done so and run the installer. What I can see it does is installing a glassfish4 environment (which seems to be fine as the tutorial covers glassfish and I would use it in tutorial). I also ran the Update Tool to get the java-ee-7-tutorial-examples.
Anyhow adding the glassfish server to netbeans 8 I mentioned in the "Java" Tab there is just JDK 1.7 which points to me 1.7 Java JDK location on the system.
Trying to find any specific EE 7 location nothing seems to be the right location (find / -name java)
So what exactly does this installation do in other words than just installing glassfish environment?
And what is the use case of having the EE 7 SDK/JDK ? Maybe I am a bit confused but I want to have these things clear for myself in order to understand it.
GlassFish Server Open Source Edition 4 is the reference implementation of the Java EE 7 specification. So you can never download Java EE itself like you do with Java SE by downloading the JDK, but you always download an application server implementing it.
At the moment, you have JBoss WildFly 8 as alternative, but it usually takes some time after more, especially commercial application servers like Oracle's WebLogic follow.
So concerning your IDE, you add the JDK as runtime as in every other java project and GlassFish as a server and target for your deployment.
Hint: In case you experience problems when trying to get the samples via updatetool (at least it was the case when I did the Java EE 7 tutorial), just try again - java.net is so awfully slow sometimes.
I am compiling my web app in Netbeans against Java EE 5. I know that the String.isEmpty() function is only supported in Java 6. Having said that, I can still compile my project using the .isEmpty() in my code.
How come Netbeans is allowing my web app to compile if I am compiling against Java EE 5?
The compiler level is not equal to the JDK level you use for compiling. The compiler level only checks for the syntax and of course creates a different output. But the compiler itself will use the jdk on your classpath so if you compiled with java 5 option but with the java 6 jars on your classpath the code will compile without an error.
You should check your classpath.
As many have pointed out, Java EE versions are not strictly tied with Java SE (JDK) versions. Mostly, they require a minimal Java SE version but are compatible with later versions.
Java EE 5 specification (downloadable PDF here) says:
This specification requires that containers provide a Java Compatible™ runtime
environment, as defined by the Java 2 Platform, Standard Edition, v5.0 specification
(J2SE)
Since JSE versions are backwards compatible, you can take a container compatible with Java 5 and run it on top of Java SE 6 or Java SE 7.
You can check the compatibility level that Netbeans is using by checking the project "Properties > Source > Source/Binary Format"
If you still have doubts about "Java vs Java EE" you can look for several questions here on SO about the difference between Java SE and Java EE.
I want to develop Java EE applications on Linux 64 bit. I want to install the latest linux 64 bit Java EE SDK. Do I need to install the Java SE SDK first? Or maybe only the Java SE JRE first?
Java EE includes Java SE. If you install Java SE first then the Java EE installer will skip installing Java SE (since you already have it).