In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6.
Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your application? I'm not sure that creating a .zip file with the Tomcat folder would work! It certainly wouldn't install the service.
Suggestions welcome!
I should note that - at the moment - all apps are deployed on Windows servers.
Thanks,
Phill
We use Ant Installer to deploy our application, app server and install it as a service. We embed Java Service Wrapper in the installer to install the Windows service.
One option would be to use embedded Winstone servlet container instead of Tomcat as described here:
http://winstone.sourceforge.net/#embedding
Then you would have executable jar file running your application.
You could probably modify the installer that Tomcat itself uses.
Simply zipping up the directory is a valid solution, but as you note, it will not install the service.
I would probably (a) zip up the directory (b) use one of the open-source service registry programs to install the server and maybe (c) uses NSIS to build an installer.
Depending on the installation environment, your installer may also need to ask the user for a server port, since your application may not be able to use the default HTTP port.
It's commercial, but install4j will do this for you, including installing the service.
You could use BitRock crossplatform installer. You can take a look at BitNami for a number of Java applications like Alfresco, JRoller, and Liferay that have been packaged using BitRock. The BitNami stacks are completely free, though Bitrock itself is a commercial tool (we have free licenses for open source projects)
Related
we have developed GUI tool using Java SE 11 , packaged using Maven. Recommend user to download and set Java in system path to launch the tool. Batch file for windows and .command file for Mac and Linux. Do we need to get notarize approval from apple to use it in Mac OS. Please advice
Thanks
You don't need Notarization for the script files. For your GUI Tool it highly depends on your projects dependencies. If your project only use common java packages, then everything should be fine. But there are libaries which require notarization. I personally had this issue with the net.java.dev.jna dependency. My experience is based on a jar bundled within an application. I am not sure if it is the same for a jar excuted from a script only. I recommend to just build your app and try to run it on a catalina machine.
I make a java application I want to make the setup file save in the USB. Firstly the installation process will check is JDK or JRE is installed or not and then proceed further installations.
Is there any tool or anything way please guide me.
You can create a standalone installer with Self-Contained Application Packaging.
According to the documentation you can create packaged application in one or more of the following deployment modes:
As a standalone application, using the system
As a self-contained application, using a private copy of JRE
As a Java Web Start application, using the system JRE
Embedded in a web page, using the system JRE
I have no experience setting up java applications and no experience with Heroku but I have this java application I would like to know if I can easily run on Heroku.
https://github.com/difi/oxalis is the github repo and here is some install instructions for a standalone server:
make sure that Maven is installed.
make sure that Tomcat 7 and Metro 2.1.1 are installed
make sure that the Tomcat manager is available on port 8080 with user manager/manager
make sure that Tomcat is also up
and running on SSL at localhost:8443
make sure that keystore.jks is
installed in a known directory (separate instructions for
constructing the keystore)
change
oxalis-commons/src/main/filters/soc.properties to reflect your local
preferences
Is this possible to set up on Heroku?
It seems like it should run on Heroku but a few changes might be necessary. You will not need to run Tomcat with SSL since Heroku provides the HTTPS in front of the Tomcat app. You will probably have to update the Maven build to pull in Tomcat via webapp-runner. The properties file should probably be replaced with Config Vars. The only part that seems like it might be tricky is the Metro piece. It's not clear how Metro is being pulled into the system and used.
I am wondering how I can quickly deploy the java dynamic web project that I built using eclipse on my mac to my Linode linux server? I already have a wordpress website running on the server and have also downloaded tomcat V6 and eclipse. Would I be able to manually copy the source, build and WebContent file contents? I would like to learn best practices for application deployment in the future but this project is very simple and I would like to be able to make it live as soon as possible. If you could also recommend any step by step tutorials I would really appreciate it.
thanks so much
Timnit
You should consider to build a WAR. Eclipse is just an IDE, it helps to develop, not to deploy.
Build your war (you can use maven/ant/build it from eclipse) - whatever you chose.
Once its ready your "deployment task" becomes a matter of moving a single file from MAC to linux server.
Use Cargo. See how easily it can be integrated with Maven build. Here is an excellent blog post.
I haven't been using Java extensively hence forget a lot fundamental things. Basically, I am working with a web-dynamic project (using Eclipse IDE with jdk 1.6), and during the build, I get errors that Cookie class and other web related classes cannot be found. What am I missing?
What Jars files do I need to add (and how)?
thanks
Think you need servlet-api.jar
Try here for any jar files you need http://www.java2s.com/Code/Jar/CatalogJar.htm
Sounds like you are missing servlet-api.jar
You can download it from the Maven repository.
Servlets are only part of the Enterprise Edition, not of the Standard Edition of Java. So you need the Java Enterprise Edition, AKA Java EE.
http://java.sun.com/javaee/
As others have said, you're missing the server api jar.
Having said that, downloading just the servlet api jar and not the server that goes with it means that you can't actually test your code.
In Eclipse, once you're installed a servlet container, such as Sun's Glassfish, Apache Tomcat, or Jetty, you can create a server instance of it so that Eclipse will compile against your server's servlet implementation. Creating a server instance also means that Eclipse's Run on Server command works.
IBM has a slightly outdated guide on Developing Web applications with Tomcat and Eclipse. The entire "Install the Web tools" section can be skipped if you have the Eclipse EE version, as Web Tools are already installed.