As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
When working with java/javaee usual development environment setup is to have everything locally (jdk installation, database, appserver etc). I know a lot of people in ruby/js world use virtual machines for development (mainly with vagrant).
I wonder if there is an efficient way to set up similar env for java/javaee.
I suspect that I can easily install database server and application server together with jdk version on such virtual machine, but what about regular development? I still need to have jdk installed locally, right? (I need my IDE to work properly) I need maven to build my project, so that I need full maven local repo. And then I need to deploy my app on virtual machine's app server.
I can see no real advantage here (still having pieces of environment on both machines).
Do you have any experience with that and can share with me?
Vagrant is basically a tool for setting up a VirtualBox virtual machine. It brings to the table the ability to quickly provision a VM and the ability to pass the provisioning recipe to others.
This is really useful in the Ruby/JS community because they don't have a compile step. The way we use it is the code stays on my local machine and all the runtime is done on the VM. If I make a change on my local computer the running program on the VM instantly picks up the change and the runtime is modified just as if the code was only on the VM. I literally don't even have to have Ruby/JS installed on my computer.
In the Java/.Net world you have a compile step so as you say you need Java and all the jars you need to compile against on your machine. This lessens some of the usefulness of the setup.
On the other hand you usually have databases, message queues, containers, etc. that you are working with and on a team it may be a pain to shoot an email and say update your db to this version and load the new sample data. In Vagrant only one person needs to make the updates and they can then tell you to grab the new VM and you do not have to do any of the upgrade steps yourself.
So it is still useful in a compiled language but it is less useful than in a scripting language.
It's not entirely clear what specifically you're looking for in terms of an answer.
IMO the value of virtual machines isn't so much for the development environment, but the runtime environment. Things like messaging/queuing, servers, databases, cloud servers (e.g., Swift), etc.
This is language-independent. For example, we have virtual machines (not Vagrant-based) that include Hadoop/HDFS/HBase, Swift, RabbitMQ, and a variety of containers.
We might deploy to those machines, but the dev tools are run locally. IMO there would be little reason to develop on the virtual machine, although there's no reason you couldn't, especially if you're comfortable with Vim/Emacs/etc.
I know there's a Tomcat container for Vagrant, although I haven't used it.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've been looking into using zk for my upcoming Java web project, but am a little skeptical because as awesome as it seems, it has an expensive licensed edition as well as a free open source edition.
I could only use ZK Open Source edition but need the "write once, run anywhere" functionality (otherwise I will probably go with GWT/Phonegap).
On their feature comparison page, they don't mention write once/run anywhere, so I'm wondering if any battle-weary ZK veterans can weigh-in on whether this feature runs on the free version or not, and how well.
I need to support all web browsers, mobile web, all Android devices (including Nook/Kindle), all iOS devices, Microsoft devices (Surface, etc.) and Blackberry.
Also, if the free/open source edition does support this feature, how does it work? Nothing in the tutorials seems to indicate how it generates native executables for the various platforms in addition to a WAR...
No.
ZK only builds Java web archive files (war), it does not build native applications for Android, iOS, Nook, Kindle, or even stand alone applications for the desktop.
ZK web applications only run in a Java application server like Tomcat, JBoss, Jetty, Glassfish, etc.
In this sense, ZK is very similar to GWT and very disimilar to PhoneGap.
With PhoneGap you build phone applications using HTML, CSS, and JavaScript. Your application is then displayed inside a native wrapper compiled for each phone platform. This is not intended for the web, per se.
With GWT you build web applications in Java code. Some of this Java code actually gets compiled into JavaScript so it can run on the client side when appropriate, offering performance advantages if used well. Writing JavaScript code as Java has the advantage of going through the Java compiler for type safety and the like.
With ZK you build web applications in Java code. Unlike GWT, this never becomes JavaScript - all your Java code runs on the server. ZK handles setting up the AJAX calls.
Programming in ZK feels as though you have a copy of the DOM as Java objects. ZK deals with initializing your Controller for a particular View and you can ask it to wire up any Component from the view. You then have those Components as objects and any changes you make are immediately (more or less) reflected on the client.
Now, ZK aside..
If you want to write code once to run on all web browsers as well as on all phones, the only option is to write a web application. At the curent state of technology, you will not be able to get native executables for all phones and a get a web application from the same code base. If you develop a web application (using ZK, GWT, IceFaces, Lift, Grails, whatever) you can expect the maximum penetration into the market as almost all devices have a web browser.
Finally, some personal opinions on ZK..
The development cycle is fantastic, I love programming with ZK.
The team and community is great also, lots of momentum.
The framework is actively evolving, new core features and improvements all the time.
I'm not sure how it would stack up against the others under heavy load.
The DOM they generate is very heavy
There is a lot of chatter between the client and server
Edit:
PS: I found this old reference to something called ZK Mobile which I think is now a dead project. My impression is that it was probably aiming to be something similar to PhoneGap in that it would just wrap your ZK website in a native Android application. Everything would still work over the internet but the user would have an icon on their phone. You wouldn't have access to any native functionality like alarms or the like.
Anyway, just thought I'd put it here for the sake of completeness.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm writing a client app, quite old school, quite conservative. On Windows, I'd probably use .NET Forms, or maybe WPF, I'm not sure. On the Mac, I'd use Objective-C, Cocoa, and all that stuff. But I want this app to work on both, and I'd rather only write it once.
Should I write it in QT? I heard that when you get down to it, QT is buggy when you use it across platforms. Do I have to worry about continuity, what with Nokia's recent troubles? What does the community think about Digia?
Should I write it in Java? Newer Mac OS doesn't come with Java anymore, and Windows never has. How can I create a good setup experience like that? What about USB devices? There are some Java USB projects, but they're all Windows or Linux based, no Mac. I'm also worried about getting a native look&feel, but I guess Swing has me covered there.
Should I write it in Python? I'm worried about performance here. Also, I've written large Python apps before, and I found that Python scales poorly to large code bases, because of the lack of static analysis.
What do you write yours in?
I asked a similar question a few weeks back Building a Mac and Windows GUI Application.
With regards to "native look & feel": If you want this, don't use a cross-platform GUI library. Write the GUI layer once for each platform. You can share the core application logic. You can probably get away with using Qt or wxWidgets on Windows and Linux since requirements for look and feel are more relaxed, but it will look rather out of place on Macs.
If "native look & feel" isn't essential, I'd say go with Qt or wxWidgets and save yourself the headaches. I wouldn't worry about continuity for Qt. Its desktop framework is very mature and isn't maintained by Nokia (they maintain the mobile part). The open source community will keep it alive. Don't know how buggy it is, but what cross-platform framework doesn't have its share of bugs?
If "native look & feel" is essential, read on for languages choices for the core application logic.
Java: Don't. Swing doesn't actually provide a native look & feel. Just try and make any comprehensive GUI with it. Swing is also very painful to program in. There are plenty of alternatives to Swing, but I doubt any of them will be better than Qt. In addition, most apps will probably need to hook into the OS. Java bridging on Macs is deprecated. You'd have to use JNI for any extensions. Probably the same for Windows.
Python: That's the path I took. Python is not only cross-platform, it comes with a rich set of cross-platform libraries. Also easy to write C/C++ extensions on any OS. Downside is that it's relatively slow to start and takes more memory than a native C++ app. Trying to set up a deployable application is rather painful too. I wouldn't worry too much about performance though unless you plan on doing serious data processing.
C++: Also a good choice. It's not too hard to write a cross-platform app with C++ if you use cross-platform libraries like Qt or Boost (haven't tried, conclusions from questions and research). Also compatible with xCode, Visual Studio, etc, so it's easy to set up the project.
Being mainly a Java dev I lean heavily to java. Your concerns with java can for the most part be handled.
One I would JavaFX instead of Swing. It is still fairly new, but I have been playing it recently and it is pretty nice. You should be able to create what ever look you like, and it be pretty consistent. The other added benefit, is that they are adding Native packaging for JavaFX. It is still early, and that is not in the stable releases yet from what I understand.
No matter what you go with there will be hurdles and issues. So regardless of what I said above, you should pick whatever you are most comfortable in. Heck you could if may even be able to go the .net route and use Mono. I hear Mono works well, especially with projects built using it from the beginning.
There are number of options available to you
Java application
Web application
Use a wrapper like App Accelerator
Java Application
Writing a Java application which is platform independent would suite your need. But development wise you might face problems. Specially GUI experience.
Web Application
Web application is the right way to go but installing it and setting up a web server in local machine might be bit tricky. Moreover if you want to host the application this is the way to go.
Application Wrapper (App-Accelerator)
If you can use an application wrapper it will work in pretty much any platform - windows, mac os. A good example might be Wunderlist.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Are there any real differences between them?
I want to program in java and python. And of corse be a normal user: internet, etc
Which one will give me less headaches/more satisfaction ?
And which is better for a server machine ?
Thank you
Since Ubuntu is based on Debian, development is almost exactly the same for both. They're both quite suitable for server machines. The fundamental difference is that Debian follows a Free software ideology, while Ubuntu sacrifices that purity for practicality when no Free equivalent exists for important proprietary software.
If you choose Debian, you will have a choice of distribution series ("unstable" / "testing") that may get you newer releases of pre-packaged software a few months sooner than Ubuntu. Unless your development projects require bleeding-edge kernel or support libraries, this probably won't matter to you at all.
If you choose Ubuntu, certain proprietary software might be easier to install because it will be available through package repositories. For example, nVidia's proprietary video driver. That's not to say you can't make such things work on Debian; they will simply be easier on Ubuntu.
I personally choose Ubuntu, for these reasons:
Ubuntu has a free multi-platform build farm and software hosting system called Personal Package Archives. (Only to be used for freely redistributable software, of course.)
The Ubuntu bug reporting/tracking system is far more user friendly than Debian's.
Software packages I develop are guaranteed to work (with no extra dependency testing) for Ubuntu users, of which there are many.
I'd seriously consider switching to Debian on my workstation if they offered a PPA equivalent. I don't use Ubuntu-centric stuff like Unity desktop anyway, and I no longer need nVidia graphics drivers (I finally got tired of their deeply broken OS support and switched to an AMD card). I already run Debian on my servers.
Both use Debian packages and Ubuntu is based on Debian but is more user friendly. Everything yo can do on one you can do on the other. I'd recommend Ubuntu if your new to linux on a Desktop. Though when it comes to servers I'd recommend Debian as it has less stuff "taken out" basically.
java and python would most likely run the same on both.
With Ubuntu you get additional space of support and active community, and perhaps larger user base.
So if and when you face a particular problem, chances are with Ubuntu, the solution will appear faster.
(although, whatever works on this should work on the other as well in theory)
Ubuntu is the more user-friendly of the two (I think Ubuntu is actually one of the most newbie-friendly Linux distros), so if you are new to Linux, Ubuntu is the way to go. Otherwise, the packages are mostly the same except for branding, so it's pretty much your choice.
In Ubuntu it is a bit easier to install packages for Java development, but it doesn't really matter that much. Remember that Ubuntu is based on Debian, so it works the same. Ubuntu just adds more user-friendly GUI's.
Neither is better. They both support the same tools and libraries. They are both linux. Anything and everything you can do on one you can do on the other.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm not looking for java-web-start, I'm looking for a thick-client application installation toolkit. I've got a stand-alone application that consists of several files (jar files, data files, etc) and would need to do some pretty standard installation tasks, like asking the user for target directories, have them locate some parts of their system - choose some of the per-machine or per-user configuration options and possibly try to detect some of the machine settings for them.
I'm looking for something which is like the MSI or other wizard driven installation applications. What's a good installer for Java? It would be ideal if it were cross-platform capable (Linux, Mac OSX and Windows).
Not an MSI-Installer but crossplatform: izPack
It's xml-file based with it's own GUI or ant task (whtaever you prefer)
Launch4j -- open source -- http://launch4j.sourceforge.net/
InstallJammer -- http://www.installjammer.com/
If you are looking for an Open Source solution, take a look here:
http://java-source.net/open-source/installer-generators
I have used InstallAnywhere and I think that it is a good solution too.
Although it is not Java-based, about half of our customers use BitRock InstallBuilder to package Java applications. It is cross-platform and supports all the OS that you require (Linux, Windows, Mac). The installer is native, so there are certain advantages to it, such as not requiring a self-extraction step or the need to bundle a JRE, so the installers tend to be smaller in size
AntInstaller enables you to create cross-platform installers where the installation itself is performed using an ANT script. The GUI is configured with an XML config file.
We used it to create quite complex installers. For complex GUIs however, the configuration can get very difficult. The next time I would probably try izPack because it seems to support ANT as well but has nicer GUIs.
I suggest izPack
with
packJacket
The Nullsoft Scriptable Install System NSIS (originally used for winamp) creates really nice installers for windows, and it's very powerful. It has a compiler that runs under linux, but the resulting installer is windows-only, unfortunately.
It's pretty heavy-weight, but worth keeping in mind if you might have to do any vaguely complex or non-standard things during installation.
I have used it since it integrates nicely with my (linux) build system, and I'd want to use packages for installing on linux anyway.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is the best OS for Java development? People from Sun are pushing the Solaris, yes Solaris have some extra features included in itself such as (dTrace, possibility for Performance tuning the JVM, etc.. ). Some friends of mine, had port their application on solaris, and they said to me that the performances was brilliant. I'm not happy with switching my OS, and use Solaris instead.
What were your experiences?
Of the three I've used (Mac OS X, Linux, Windows), I consider Linux the best place to do Java development.
My primary personal machine is a Mac, and I've done quite a lot of Java development there and been happy with it. Unfortunately, however, Apple lags behind the official JDK releases and you're pretty much limited to the few versions they choose to provide.
My employer-provided machine is an old P4 crate from HP which I use mostly to keep my feet warm. The real work occurs "Oberon", on a 2.6 GHz quad-core running Ubuntu 8.04 in 32-bit mode [1]. The two advantages I notice day-to-day compared with Windows are:
A powerful command line, which helps me automate the boring little stuff.
Far superior file system performance. (I'm currently using EXT3 because I'm becoming conservative in my old age. I used ReiserFS previously, which was even faster for the sorts of operations one typically performs on large workspaces checked out of subversion.)
You can get those advantages from a mac too, but Linux offers another nice bonus:
Remote X11: Before my $EMPLOYER provided e-mail and calendar via web, I had to be on the Windows box to read my mail and see my meetings, so I used Cygwin's X11. This allowed my to run the stuff on Linux but display it on my windows desktop.
[1] I used to run Ubuntu in 64-bit mode, but I had no end of trouble. (Mixing 64-bit and 32-bit is something Mac OS X does much better.) 7.04 worked fine running 32-bit applications on the 64-bit kernel. 7.10 broke the linux32 script and the ability to install new 32-bit applications though old ones continued to (mostly) run. 8.04 killed 32-bit java by making it impossible to connect to the network from a 32-bit JVM (no more updates for Eclipse). Running Eclipse 64-bit didn't work reliably. The then current version of oXygen would only run (grudgingly) under the IBM 64-bit VM which would work for about 10 minutes until it stopped getting keyboard events. I finally gave up in frustration and used my Mac for a few months until I had enough slack time to do a 32-bit install of 8.04 on the linux box. Now everything works again and I'm quite happy.
Develop on whatever you like. As a java programmer you might want to avoid Mac OS X, primarily because new features seem to have been significantly delayed, and also because you can find you've no longer got a machine that supports the new versions of Java. Having said that I imagine developing on Mac OS X must be very nice (command line interface, dtrace, nice OS).
I develop on windows with IntelliJ 7. It's ok, but needs some hefty hardware. I then deploy onto solaris/linux. Unless you're writing GUI's or integrating with C++ code, you should be fine choosing whatever takes your fancy.
I'd say Mac OS X.
Java development built in. All the unix command line tools you want. Out of the box. Ant and maven are there. Not the latest versions, but that's easy enough to upgrade.
Yes, you might not have the very latest version of the JDK, but really, unless you have a need to develop for the latest and greatest JDK, it's not going to be an issue.
"development" ?
I believe you should stick to the OS you are the most comfortable with, or which is the most available to a large group (of developers), like for instance a set of PCs on Windows.
It is rare to need to do in-depth tuning on development platform.
You would reserve all those dtrace and other performance tuning to assembly platform (for example in Linux), for daily deployments where everything is recompiled and unit-tested.
And then you could set up a special JVM (like IBM JRockit instead of Sun JRE) to do some analysis on your integration platform, where all your system can be tested from front to back, with stress and non-regression test
And finally, make all UAT (User Acceptance Tests) on a pre-production platform (which can be an expensive F15K or SunFire880 or V490 or...), with the target JRE used there.
My point is: there is so many parameters to take into account between development and release into production that switching OS at such an early stage may prove unnecessary.
Develop on what you're happy with, and test on what you deploy on.
I get to develop Java on my Mac, and deploy on Solaris and Linux. The truth is that for the bulk of tasks, Java can be developed in an OS independent manner. This is especially true for server side development.
I like developing on a Unix in general over a Windows box, but that's me.
Answer is easiear than you might think: use your favorite OS. For Java, it's the best answer. Not the development itself, but your comfort will help your success, browsing docs etc in your favorite environment.
Personally, I would not bother. I would use the platform that best supports the development tools and target platform that you use.
Why do you need to tune the JVM? This is a very unusual thing to want to do. Would you be better writing in a lower level language like C++?
Dtrace is available for OS X, there is a linux port too.
Solaris has historically had a reputation for being slow (hence the Slowaris nickname). I'm not sure if this is still true.
I've used Linux, Windows and OS X. My big argument in favour of OS X is that it is user friendly operating system (ie. I can run iTunes, most modern browsers, and don't need to allocate 50% of my time maintaining it on a laptop like linux) with a unix foundation. As most my development is for unix systems, this makes life hugely more productive. Also, there is a more and more active development community behind the platform here. These reason also work in reverse for Windows - while cygwin closes some of my requirements for using unix tools - it's nothing like having a real unix system.
I have had success before doing Java development in Windows with Eclipse. Sounds like you are also asking about deployment/hosting. Whichever OS is best to run your application on should not really predicate what OS you use to develop the application.
Windows and Eclipse works well, as pmiller suggested. I can also recommend OS X with either Eclipse or IntelliJ IDEA (the latter also works on Windows, too).
I've only ever done the most basic Java development on Solaris (basic data structures' programming practice at University), so I can't offer any real comparison, I'm afraid. I did find it quite painful on Solaris, though, due to a lack of proper tools (I think I was restricted to nedit or something).
One thing you have to take into account is whether you are going to be developing an application that could be run on a mac. I love OS X, but good old steve made sure that we're always many JDK versions behind. We just barely got Java 6. Developing on a mac may at least insure you are working under the lowest possible JDK version.
Your development environment MUST BE THE SAME AS PRODUCTION.
There is no "best development environment" which is not identical to your production environment. Run what you run in production, in development.
That said, that doesn't mean you can't run your IDE, for example, on another OS, provided you still do development on the same system as production (on another machine, or a VM, for example).
Windows is just fine.
Solaris is a wonderful Java development environment too (I like it better than Windows, but for subjective reasons), but unless you're deploying on it, it might not be worth switching to.
Linux is a little clunky for Java development, but doable.
The only one I can't recommend is Mac because they're always so far behind on the version of Java available (Not provided by Sun, Apple does their own).
My best advice is to develop on the platform that you are targeting. That way, when you run it during you development testing and run your unit tests, you know that it will work on the target platform too, without any nasty surprises.
If you are targeting all platforms then you might actually want to develop on a Mac because you will get the most nasty surprises on the Mac. As far as Java goes, on Windows and Unix, "it just works", but not so much on Mac. Sun develops the Java runtime (JRE) for all operating systems except Mac. Apple develops their own JRE.
If you develop on the Mac, you are most likely developing against the least common denominator, so what runs on Mac should run on the others. That has been my experience.
Barring that, I always recommend that you choose the operating system based on whether it runs your software. Pick the OS that runs your IDE and other tools that you use for development and testing. If more than one OS runs the tools that you need, pick the one that runs them the best.