seam-gen vs eclipse seam web project - eclipse

I'm trying to learn how to develop a j2ee web application but is currently figuring out what's the advantage of using seam-gen vs eclipse seam web project or vice versa.
Why would I use one over the other?
Thanks,
czetsuya

Command line seam-gen stuffs the whole application into a single project and included some files that we didn't need (6 versions of the messages file, for example, each in a differnet language).
The eclipse jboss tools seam-gen produces a bit more modular, streamlined app. It generates 3 separate projects (4 if you want a test project). It took some time to get used to it, but once I got it down, I prefer it. Additionally, when you create he project in eclipse you can leverage more easily the benefits of using those integrated tools.
You can do this with a seam-gen commandline-generated project as well by creating an eclipse project using your seam-gen project as source , but it takes some fiddling around in eclipse to get the settings just right.
My recommendation is to go with eclipse/jboss tools. If you come from a command-line centric background (as I did), the learnign curve may be a bit steeper, but in the end it will be worth it. Use the jboss tools forum for questions you have about this project.
Good luck. Once you get going with eclipse/jboss you'll find it's a great environment to work in.

Related

Integrate window tester with eclipse for testing UI

We are planning to automate testing of my eclipse application GUI using window tester. Version of eclipse is oxygen.
Please inform me how to integrate window tester with eclipse application. I do not see any window tester plugin in eclipse market place. If not, Which GUI testing framework can i use to test my eclipse application.
Thanks in Advance.
I have personally used first two types of the frameworks:
SWTBot
RCPTT
Jubula
RedDeer
RCPTT is focused on creating and running UI/System test for RCP/SWT applications. It is an alternative or addition to the open source projects SWTBot or Jubula. All of them have their specific advantages and disadvantages, RCPTT uses a very different approach than that of SWTBot or Jubula.
SWTBot is a Java API to consume while writing tests (can be JUnit,
TestNG...), which makes it very easy to use for Java developers.
Jubula has its own XML-based languages to write tests. Аlso
uses an embedded database and thus differs internally most from the others.
RCPTT using Eclipse Command Language to write tests.
Thanks to #howlger for help.
Jubula test can be written either with a UI, which can be used without any programming experience or with an API for Java.
I would have written this in the comments for #MBaev but i was not able due to low reputation

weblogic data source not listed in eclipse

I was developing java ee applications in netbeans, for some reason I jumped to eclipse.
In netbeans when I click on "entity classes from database" I used to see oracle's data source, basically the database. And easily I used to create my beans.
Now, is there any way to do so in eclipse? If so, how to do that?
There is no direct equivalent for the netbeans functionality you are seeking in eclipse (or at least not that I know of in the stock eclipse install).
For starters, you should be using the eclipse version built for Java EE developers. It has a Data source explorer as one of the tabs. Here, you can add data sources that you can use to configure your applications.
More information here.

JavaEE Build tools: Eclipse, Maven, Whatever

I have a newbie question...
I started learning java web development with eclipse (because it takes too much time to compile and put classes into corresponding directories). Actually, eclipse possesses every tool to develop anything there.
But a few days ago I realized that in the books I read about javaEE development eclipse is not even touched upon or referenced - everything the author does is using such tools as Maven, JUnit...
So I started wondering - maybe not learning Maven I am missing something out?
What is it used for (except structuring of the application), what are its benefits over eclipse? Which IDE`s do developers in companies use to create and deploy javaEE applications? If Maven is used, how do they type the program itself - in Notepad?
I think you have a real mess in terms. So here are some quick tips:
Eclipse is an IDE, you have that right.
Maven is many things but not an IDE - it can help you manage dependencies, build process etc.
JUnit is a testing framework.
All of them can be used together in Eclipse and you can write your code as usual. These tools just help you with some repetitive tasks.
I recommend you not to use Notepad for Java development and suggest you to read this article.

How to use Jersey with Eclipse Helios?

My base need is to use the Jersey framework to develop very basic REST webservices.
I've read several tutorials regarding Jersey (JAX-RS framework) and writing webervices but so for I've not found an easy way to setup a development environment based on Eclipse Helios and Glassfish (Open Source Edition). When creating a Webservice in Eclipse, it seems to use JAX-WS, or when creating a Dynamic Web App, Eclipse reports a credentials error (I use admin/admin) or a wrong user name / password.
The tutorials I've found either use myEclipse, or Tomcat, or Maven. The later works pretty well but I wish I could avoid using the command line because creating the web.xml and other files like that one is really scary, and I'm not sure these files are supposed to be human-written. So I suppose (maybe I'm wrong) using a IDE will make things easier.
What do guys use ? How do you generate these files ? Do you use Eclipse only for writting code or also use the deploy facilities?
Any pointers are appreciated !
Thank you
SCO
You DO need to modify web.xml whenever it's needed. Especially with JAX-RS, you will have to define your servlet in web.xml.
I recommand you to use Maven. There are plenty of exemple in the web to do so. Good luck, JAX-RS is really great ! Maven is also nice.
I also use eclipse for creating and consuming web service based applications. In addition to WTP, I also use Axis plugins to make things easier (through wizards, highlighting as well as for schema verification).
The bottomline is to find the plugins that suit you the best

SWT Deployment as EXE

I've recently started learning SWT (on class #4, to be precise) due to business requirements, and previously I had been developing with Swing for 2 years.
We deployed Swing applications as jars with resource dependencies. In SWT, what are the deployable forms and equivalents?
I have questions but since my training is online, I'm on a course-ware and there is no instructor, except StackOverflow:
Can SWT apps be deployed as independent EXE's? And what's with the "Eclipse EXE" thing people talk about? Does it mean that all SWT outputs will be Eclipse based EXEs? Or can they be completely independent EXEs?
If the answer to 1 is yes, how does the compiler produce native win32 executable code? This is one area where I'm thoroughly confused. Typically, a deployable jar is fed to the VM which reads the manifest and does its stuff, but an EXE as output? What's really behind the scenes?
How are external resource bundles managed? At the time of deployment?
Internationalization support?
Thanks.
Deploying an SWT application is exactly like deploying a Swing app, with the addition of several jars and a native library. You must currently be using some tool to make exe files for your Swing app; that tool may or may not be competent to also package up a native code library. It is unlikely that the tool is creating 'native win32 executable code'. Rather, it is packaging up Java class files along with the JRE and a stub Windows PE file.
SWT is developed as part of Eclipse. Eclipse has the Rich Client Platform, or RCP. If you build your Java application as an RCP application, you can use the Eclipse tools to generate an executable package for Windows (or anywhere else). It is not a single executable, it's a directory with an executable in it. However, you don't have to use Eclipse to use SWT.
An RCP application has to use much more than just SWT. It has to be constructed as a set of OSGi bundles that depend on the core Eclipse platform. Once you have such a thing running inside Eclipse, there is a wizard in Eclipse that will create a Windows 'executable' (a directory containing your code in JAR file(s), a lot of Eclipse code in JAR files, the JRE, and a PE .exe stub). You can automate that process from ant, though I've never done it myself. You will need to do book-length reading to get up to speed on all of this, I fear.
There no difference between SWT and Swing in terms of resources and internationalization. Other Eclipse-related libraries include an I18N discipline, but not the core SWT. You just use locales and property files as in any other Java application.
SWT is not Eclipse-based, but the Eclipse UI is SWT-based. Eclipse uses the SWT library for its drawing. It is used a GUI library from the Eclipse consortium, available for many systems. If you want to deploy your normal Java Application with an SWT GUI you just add the corresponding libs and .dll's or .so's. Therefore, everything you can do (deployment) with Java respectively speaking Swing, can be done with SWT, if you provide the according libraries. There are tools and ways to compile everything into .exe's but that is not necessarily needed.
I do not really get the Eclipse EXE thing you are talking about, but eclipse just provides a starter exe, which is basically just a wrapper. Otherwise, some people refer to Eclipse RCP als Eclipse EXE but this is not correct. You CAN use the Eclipse RCP to base your App and this would use SWT as UI library. But you can use SWT all by yourself just as library without the Eclipse trail.
I hope this helps.
You can use a java to EXE wrapper like this one http://jsmooth.sourceforge.net/.
Hope it helps.
Basically you need to get your project running with the conventional java -jar command.
Then create an exe bootstrap program that runs the command when you double click it.
Extra things can be done like checking JVM versions inside the exe program.