I've used ZenTest and autotest to work on Ruby projects before, and I used to using them for test-driven development a la this configuration. I have a project that I'm currently working on in Java, and I was wondering if there is something similar in the Java world to achieve the same effect.
Might I also suggest Infinitest, it is under active development and works with other languages besides Java. I believe it works fine with Scala, but I haven't had much luck using it with Groovy.
It is free for personal use and is being developed by Improving.
I use junit max which is a eclipse plugin written by kent beck
Although not a lot of people use autotest like tools in java, there is one (although not so mature).
A blog about it.
Autotest for java.
I used the tool and looks pretty cool for first release.. I would request him to come up with next version soon...
I was looking for something like this a couple of weeks ago when I had to start doing some java. I couldn't find anything anywhere (being new to java) and I don't use eclipse so I hacked this together and will hopefully make it more useful in the future when I find some time:
http://github.com/feydr/crappe
Related
Basically, I need to run Groovy Scripts to manipulate Java objects, and GroovyShell / GroovyScriptEngine seems to be the best way to do so. Is it possible to embed Groovy inside a Java App? I tried placing the groovy-all-1.8.2.jar into my Android Java App's libs folder, referenced it then hit compile but I got a bunch of errors.
How do I do this?
I don't believe this will work. Groovy converts scripts to bytecode, and as the Dalvik bytecode is different to the Java bytecode that Groovy expects, I believe it will have problems...
The Discobot from a few years ago has been resurrected though, and great progress is being made so there is hope on the horizon.
But that doesn't help you today...
In near future it will be possible: http://skillsmatter.com/podcast/home/groovy-android/
I have found it recelty.
You can find the solution from http://melix.github.io/blog/2014/06/grooid.html.
Check it http://glaforge.appspot.com/article/groovy-2-3-3-and-groovy-2-4-beta-1-with-android-support too!
Since 09/2011, Discobot seems to be stuck. The last results seem to be : most of it works, but this is very slow.
Groovy 2.0 is out now, and Guillaume Laforge (insider) says it could helps - especially because of the #CompileStatic new feature of Groovy 2.0. Since then, Groovy 2.0.1...2.0.4, it looks that static compilation got a lot of bugfixes.
But for now, on the official website of Groovy, Android is not discussed, nobody seems to really be in charge (see wiki and wiki).
Here is an example of what you are trying to accomplish. https://github.com/melix/grooidshell-example
It is pretty slow since it has to first compile to class files on the android device and then convert them to dex, but it will accomplish what you are looking for.
A better choice for running scripts on Android is SnapScript. It does not rely on Bytecode and is fully supported on Android.
I am quite new to Java EE, in the past I developed mostly on .NET. Soon I'll start with a project based on Java EE (using Struts2). I am sure that there is some way to create a Template for the site which can be changed quickly (something like the Masterpages in ASP.NET).
What solutions are there? Which is preferred?
Thanks in advance
Johannes
I don't know ASP.NET and Masterpages but you might want to look into the Tiles plugin.
Edit: looking at the Masterpages documentation it seems like Tiles really is the equivalent you're looking for.
If you're looking for a template for the site to use with Struts2, one option is to use Sitemesh
I spent the last year doing Ruby development, and during that time I discovered irb, which makes running little "code experiments" easy and fun. I've recently switched teams and am now doing Java development, and I've found that I really miss my irb window. I would like to do the same thing for Java, but I don't know how.
I'm using Eclipse (groan), but Eclipse's bells and whistles are not the same thing.
BeanShell is probably what you're looking for.
https://github.com/beanshell/beanshell
There are a few choices: BeanShell has been around for a long time, and is a great Java REPL.
Another alternative is groovy's groovysh or groovyConsole. While groovy isn't Java in the strict sense, it's great for interactively playing around with Java classes.
Old question, I know, but jshell: The Java Shell (Read-Eval-Print Loop), is coming in Java 9 (Summer 2017, hopefully).
Would "Use an Eclipse Java Scrapbook page" be better ;-)
I haven't actually used irb, but if you just want to run code snippets inside of eclipse, then this is a simple way of doing it.
Tried JShell and beanshell.
Do suggest JShell over beanshell. Up key will roll back to history lines. Display much user friendly.
Thank you #Anders Sandvig
It can be found in jdk since java 9.
I'm going to give a talk about using Java and Scala together and I want to investigate some projects (large and small) which contains Java and Scala code.
If you know links to correspondent projects post them here.
This page on the Scala wiki is a good starting point...
The various scala testing frameworks come to mind. They all have some integration with JUnit or TestNG
Gimd is one example of small project: http://code.google.com/p/gimd/
Although development stalled for a while because I'm busy with other duties it already contains some examples of Scala<->Java integration. Notably:
unit tests are written using junit
Gimd is using JGit (library in Java) as underlying layer
While working on Gimd I found that using Java from Scala is mostly easy and seamless the contrary is not always true. It's not really a fault of Scala as it's simple manifestation that Java is a less expressive language.
Unfortunately I don't know any open source project but I have worked on very large projects over the last few years that have java and scala interacting and my experience has been mostly very positive. If I had one piece of advice it would be to use scala-javautils. It's a life saver and is far better than the scala jcl code. Before we started using it trying to get some interactions involving collections was heart-breaking. However I'm led to believe 2.8 will solve this.
In general I find the interactions between scala and java very close to using one language.
What modes are the best?
And any tips or tricks that make developing java in emacs a bit better.
For anything else than casual Java editing, many people recommend the Java Development Environment for Emacs.
Eclim is a project that uses eclipse running in headless mode to provide features to Emacs such as in-line error checking, auto import management, basic refactoring, etc.
It's much easier than JDEE to set up and when paired with something like YASnippet I find myself more productive than I was in Eclipse. I currently have to go back for step through debugging and some project management, but I am pretty happy with it. If combined with something like JDIbug I think I would have even less reason to ever use eclipse directly.
Hope this helps
The best Java debugger for Emacs I've used is jdibug.
I have used JDEE over two years.Unfortunately,it was too old and stopped.JDEE doesn't support new features since Java 5,e.g, we can't create enum type using JDEE. And the author didn't answer any questions.I am still using Emacs+JDEE,but I can't see the future of JDEE.
Java refactoring for emacs:
http://www.xref-tech.com/xrefactory-java/main.html