Hi I'm totally new to development. I'm trying deploy a web application on a local server like glassfish/tomcat. Backend of the app is written in Java and ui is created using HTML/css/js . I'm using maven as well. I'm not able to find a way to get this running on intellij CE .
Apparently this functionality is not supported in CE. Can someone suggest a turnaround or a different IDE as good as intellij idea. I've tried eclipse but I didn't find it completely useful
Thanks
There is no IDE as good as IntelliJ. JetBrains makes the best IDEs on the market.
No, I don't work for them. I have no affiliation at all. I'm just a satisfied customer for the past 13 years who is happy to buy a license with my own money every year.
The comparison matrix for community and ultimate editions makes it clear: You cannot deploy in IntelliJ without a licensed copy.
You can create a WAR file and deploy it manually to Tomcat or Glassfish if you wish. Why not just do that?
I will compliment you on how you are approaching the problem. IntelliJ, Maven, and your other choices are very good.
If you feel up to the challenge, you can look into Spring Boot. You can run an executable JAR and leave Java EE app servers behind. IntelliJ community can easily run a Spring Boot app.
Choosing Spring Boot does mean leaving EJBs behind. Everything you can do with Java EE is available in Spring Boot. You'll be using POJOs.
Related
Does anyone know of a way to hot reload a Spring MVC (not spring boot) application in VSCode? I'm using the Microsoft Java Extension Pack and Tomcat for Java extensions to compile and run them, but it seems that for every change I make I need to rebuild the .warfile and restart my server.
Personally, I think this is highly inefficient and tiresome. Does anyone know how to make this process automatic? I migrated from Intellij because apparently this isn't possible in the community version.
P.S.: To be more clear, I'm using Spring MVC but I intend to build a REST API with it, so I will not be using any .jsp files.
There's a feature request in github: Autorebuild option as eclipse, where the author ask the auto-rebuild feature including rebuild war packages.
The programmer still keeps the issue open and waits for users to vote it up then decides if this feature is needed, so you may upvote and comment there.
I'm interested in doing some Java web development but I'm not really interested in using Eclipse. I have used Eclipse in the past and to me it seems to add a layer of abstraction that I'm not really interested in. However, I'm having a bit of upstart problems.
Does anyone have any good references/tutorials in getting up and running with Java web development without using Eclipse (or any other IDE for that matter)?
Create a maven project and use one of the embedded web servers like jetty or Glassfish.
Also, this approach allows you to work with the command line directly or use either Netbeans, Eclipse or IntelliJ as your IDE as they support Maven projects. I do not think that JDeveloper can yet.
(Eclipse may require the m2e plugin from the marketplace, and it handles all the Eclipse configuration transparently and directly. Highly recommended).
You can easily do java web development using notepad only. The extra work is, you have to write some extra code (like in servlet you have to write web.xml http://www.tutorialspoint.com/servlets/servlets-first-example.htm). Same in Struts, Hibernate and Spring framework, you have to write config file in notepad.
I have a multi module maven project containing a common model project and two web projects( 1 for the site uses jsf, and another is set of axis based web services used to collect data from the user)
When I deploy to tomcat I deploy it as 2 war files, the model project is compiled as jar and is included in both war files.
Lately I have been getting a lot of permgen error. I am wondering if it is because I have these 2 war files each of which contains required libraries like HIbernate, Model project, and a bunch of other libraries needed for the individual projects.
My question is am I doing it right(I don't think I am)? and what is the best way to deploy a multiple web projects which depend on a common model project?
I have no experience of Maven, but I recently worked a lot with Java EE and in particular tomcat. I never got tomcat to work together with Eclipse (I have worked in Eclipse for Java projects since I started learning Java four years ago). I did a series of assignments and projects for a class at my school KTH. We had to use OpenEJB together with tomcat for the assignments but it was really messy to get it to work in Eclipse. So during the first assignments I just wrote code in a text editor and compiled from the terminal (OS X) and it was really ineffective.
However I got tip from a class mate that Netbeans had good support for Java EE. So I switched to Netbeans and used Glassfish and JSF. Switching to Netbeans proved to be a good choice. A really nice feature with Netbeans is that it can generate entity classes automatically based on your tables in your database. And then based on those entity classes Netbeans can generate JSF pages (controllers) for you. This makes it really fast and nice to develop Java EE projects. I followed this excellent guide:
http://netbeans.org/kb/docs/web/jsf20-crud.html
I hope this can help you! Sorry I couldn't give you a more precise solution.
Good luck!
I guess the answer is to package it as EAR file instead of WAR as you can package the jar files used commonly by the two web projects. only thing is I won't be able to use tomcat, time to look at Application servers will also try TomEE per David Blevins's suggestion.
in our company we are switching to Java. We want to develop Web Applications using the Spring Framework. We had 4 days of training where the trainer showed us Java using the Springsource Tool Suite which is based on Eclipse.
However i have used previously NetBeans for developing PHP applications.
What do i lose using NetBeans 7.0 compared to using Springsource Tool Suite 2.7.0? Is it really worth developing Spring Framework Web Applications using the dedicated Springsource Tool Suite with having in mind that we are novice in Java?
UPDATE
To provide more information: we want to use the following technologies:
- Spring Framework 3
- JPA (Hibernate)
- Apache Wicket
- Maven
STS has built in Spring refactoring facility - one among a variety of reasons why STS is the preferred choice for spring development. So for example, you were changing the bean names, the STS will automatically update the bean definition XML files.
I personally prefer eclipse over Intellij Idea; since eclipse is more lightweight than IDEA. Since STS is built on top of eclipse, that makes STS my preference too.
All the spring tutorials and examples by springsource are in STS.
STS is free whereas IDEA is not. I haven't used Netbeans though.
I would recommend IntelliJ over Eclipse. I can't speak for STS, since I've never used it, but IntelliJ's Spring support is excellent.
I couldn't disagree more with the comment above stating that Eclipse is lightweight.
STS is the best IDE for Spring IMO. Besides Spring ,it includes Maven, Spring Roo which I like very much and there is a version that includes Google's App Engine SDK and GWT SDK.
I think the biggest reason to go with STS is that the majority of developers using spring choose that IDE. Most of the tutorials, forum posts and documentation you view will be based on STS. I also like how maven and tomcat are prepackaged in the IDE. Also the Spring Template Projects easily port into STS, these projects are extremely helpful because they are prewired. I'm not sure if you can get them through netbeans without a bunch of initial configuration of maven.
I suggest using IntelliJ IDEA. It is the best IDE for developing SpringSource applications in my opinion. You can demo the ultimate version it or use the Community edition.
I like IntelliJ quite a bit. However, if you are an Eclipse shop, look at SpringSource Tool Suite http://www.springsource.com/developer/sts
There are many helpful tools in STS specifically designed for Spring Developers. Check out my DZone Refcard which was just published this week http://refcardz.dzone.com/refcardz/eclipse-tools-spring
I like to use IntelliJ IDEA. It has some advanced code related suggestion which would give not only benefit for Spring Framework, but also other frameworks. To me, it is the complete IDE. For Spring it gives convenient auto detection feature. The code navigation for Spring Framework in IntelliJ IDEA gives uniqueness and convenience.
Which is the best application server and the best ide for an absolute beginner for locally hosting servlets
One good solution is Eclipse + Tomcat.
Check this screencast for further information.
Eclipse and netbeans each have a distribution that includes all you need for Servlet development, including a server.
Between the two, eclipse is the more powerful, but for a beginner it could be a bit overwhelming. Netbeans is less configurable, but that also means there's less to distract you from the "normal" way of doing things, which is probably the best for a beginner.
I'd recommend NetBeans + Apache Tomcat/Jetty is you're just looking into servlet development. If you plan to do some EJB3/3.1 development as well have a look at Glassfish or JBoss AS.
NetBeans integrates great with all of these and requires far less configuration than Eclipse to get you started.
You might consider as an IDE option IntelliJ IDEA as well, it's heavier that Eclipse and NetBeans, but it has some compelling features of its own...
I recommend using Eclipse Java EE version, together with JBoss Application Server. You can download Eclipse plugin: JBoss Tools which adds alot of nice plugins to Eclipse.
You can download JBoss AS (Application Server) for free.
All products are free and opensource.