I'm kinda stuck with compiling a Servlet in Eclipse on Mac OSX 10.10. Code doesn't matter here - it's a simple HelloWorld example. Point is, I need to install J2EE for this and I have a hard time figuring out how.
Now - I went to oracle's web page
http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-7-downloads-1956236.html
and downloaded the .zip file. Turns out to be some kind of application server called Glassfish. I don't need this. I don't want this. (I wanna deploy my app on a Jetty) Whatever. But where's the J2EE?
In the documentation it reads
To Install the Software
The following procedure describes how to install the SDK distributions using the ZIP file.
Download the distribution file for your platform from the Java EE 7 SDK Downloads page.
Navigate to the directory where you downloaded the file.
Unzip the file.
Solaris, Linux, and Mac OS X systems: unzip zip-file-name
Windows systems: Unzip using your favorite file compression utility.
The Java EE 7 SDK Update 1 or Java EE 7 Web Profile SDK Update 1 is extracted into a new glassfish4 directory under your current directory.
That's pretty much it: http://www.oracle.com/technetwork/java/javaee/documentation/javaee7sdk-install-1957708.html
Yeah - the content looks like a bunch of examples, this glassfish-server-thingy, and some docs.
Now how do I get from here to Eclipse compiling an HttpServlet-class??? Googled for an hour by now - nothing really helped :(
Related
I installed Glassfish tools using Eclipse Mars on Windows 7 64 bit. I am getting an error "The specified directory is not a valid GlassFish installation", mostly because I can't find the actual installation root. After installing it through the Marketplace it doesn't seem to be on my hard drive.
This link suggests it should be on the top level of my C: drive, but it isn't there.
I tried to search for it, but searching my entire drive I only find C:\Program Files\eclipse\features\oracle.eclipse.tools.glassfish_8.6.1.201603011333 which doesn't seem to be what I'm looking for and Eclipse agrees.
I found this work around, but that is for Java EE 7. Mars requires Java EE 8.
Some tutorials show a step in Eclipse where the server is installed in a folder of my creation, but that step never comes up.
Not sure where to go from here. Any suggestions?
I have a question about deploying windows application with java module.
I have windows application with several modules. One of these modules is written in java and is packaged as jar-archive. And if there's need for using this module, the application ask jre to start execute this jar.
For this time during application installation it's initialized jre installation.
I would like to understand the following.
Is it possible to install during application installation silently install jre in the application directory. So it jre copy could be used by the application.
I'm talking about structure like this:
/app
/app/jre
/app/modules/myModule.jar
So if it's needed to run myModule.jar I could do it with java from app/jre/bin ?
I saw something like that at Spark messenger (http://www.igniterealtime.org/projects/spark/). This application uses its own jre, which is installed at /Spark/jre/. But as I understand, this application is written in java and builded as a windows distributive using install4j.
I tried to find the answer to my question, but maybe I'm doing something wrong, I always find a solution of creating an exe-wrapper for jar file.
I would like to know about possibility to deploy application with installing jre locally in application folder.
You could ideally have used Java Web Start in the past.
Currently, you can use javapackager.
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javapackager.html
The javapackager command allows developers to create standalone native install bundles that do not require a separate JRE installation. The native options include: installer, image, exe, msi, dmg, rpm, and deb.
This is ideal for desktop applications, where the user may not have their own JRE installed and just wants the program to run. It may not be appropriate for server-based applications where an administrator would want full control over the environment.
https://blogs.oracle.com/java-platform-group/entry/java_web_start_in_or
In your /app/jre/bin folder there should be an executable binary called java. So in your folder /app/modules you can run
/app/jre/bin/java -jar myModule.jar
That should work.
I'm using the android_sdk.zip version, since I don't feel comfortable using installers on Windows systems. However, I understand that I need to set the Home variable in order for the SDKManager.exe to run properly. I tried another method posted on stackoverflow, but if I do that, then both Eclipse and Netbeans, won't find Java anymore.
"C:\Program Files\Java\jdk1.6.0_25\bin';'"
Any ideas?
Thanks!
I believe there may be a bug in the installer for Windows, as I haven't seen it work properly at detecting a JDK on Windows 7 at all.
If you are planning on developing in Eclipse, it isn't even required. You'll save yourself a lot of time and headache if you just download and install the SDK zip file (instead of the installer EXE).
Download and unpack this file somewhere on your machine
Install the ADT plugin into Eclipse
Point ADT to the location you unzipped the SDK in Preferences
HTH
How can i make up am installer for my java application (jar file) . The same as that of windows installer which proceeds by clicking next and installs the application. What i want with my java app is, the open source library xuggler to get installed if it is not already present in the system.Then i want JRE to get installed if it is not already present in the system.
If the user does not have xuggler or JRE installed , installer should automatically install the xuggler and JRE. Or it should tell the user to get that version of libraries from the given URL and then continue.
Your question is similar to this one:
how to package a java application
Advanced Installer has a separate edition especially for creating installers for Java apps, so this might be what you are looking for. I would recommend other tools but since they're scriptable, they're a hassle to work with, lots of things can go wrong.
Hope this helps
If your app. has a GUI, use deployJava.js for the JRE and then Java Web Start to install/launch the app.
An installer-desc can be specified in the JNLP file to install Xuggle. JWS can partition the download between OS.
JWS is supplied by the makers of J2SE JREs for desktop PCs (e.g. running Mac OSX, *nix or Windows).
NullSoft have a very good scriptable, opensource installer called NSIS.
http://nsis.sourceforge.net/Main_Page
I'm not aware of a cross platform way to do this. In the Windows world, you can use Wix to generate an MSI file, and in that file you can specify dependencies such as the JRE. In the Linux world you can generate a file with the dependencies read by the package manager, a deb file for Debian based releases for example. It's a bit of a faff to set things like this up separately, but once it's done you can just integrate it into your ant script and build everything automatically.
I'm trying to learn servlets and JSP and would like to do this with Eclipse. When I click about in my current version, I get this info:
Eclipse IDE for Java Developers
Version: Helios Service Release 2
After searching a bit, it seems you cannot access these features with this version - you need "Eclipse IDE for Java EE Developers".
I've found a tutorial to install these plugings in your Eclipse installation, but I'm just getting a "failed"-message with no error message. After this, I decided to just download a new version (the EE one ofcourse) from the Eclipse website. The old installation is in c:\program files (x86)\eclipse, the new one in c:\program files (x86)\eclipse2.
The old one still works fine, but when I try to run the new one, I get this:
I have no clue what is wrong here. Am I doing something wrong? The only thing I want is to use Eclipse for JSP and Servlet Development (soon also EJB).
Thanks
Eclipse cannot find your JRE/JDK. Put the JRE/JDK folder in your PATH variable. My JDK is located here:
C:\Program Files\Java\jdk1.6.0_24
Should be a similar path for you. Add that to your PATH variable.
Have look at this tutorial to find out how.
Make sure a Java 6 JDK is installed. If it is then you should be able to type javac -v on a command prompt and see output like this 'javac 1.6.0_26'
Once you have this correctly eclipse should start with no issues.