Eclipse for Mac OS X - java

I am Java developer who is using Eclipse on a X86 computer to code. I am considering to buy for other reasons an Desktop Mac computer and I would like to use this computer to do my coding work. I know there is a Eclipse version for Macs, I am asking if there may be some problems/issues related to Macintosh computers. Thanks!

It really depends what you'll be doing.
In terms of the IDE, it will work just fine and you can copy your files/projects over and they will "just work".
However, there are some things you need to be weary of:
Key mappings might be different
You won't be able to do any JavaME programming as there is no Mac toolkit for that.
If you're doing Swing development, make sure you test your code on your target environment as things might look different.
Other than that, Macs work fantastic for Java coding.

No, Eclipse works just as well on a Mac as on a Windows or Linux computer. Key bindings are different though; if you're used to the shortcut keys of Eclipse on Windows, you'll need to get used to different shortcuts on the Mac.

Apple just announced that they are deprecating their Java platform. That may cause some problems in the future. Update: however, I have seen that Eclipse works with the soylatte OpenJDK port.

http://developer.apple.com/tools/eclipse.html
and if you want the non-Apple-bs experience:
http://cdtdoug.blogspot.com/2010/04/mac-gets-no-love.html

From my personal experience, Eclipse actually works better on OS X and Linux than it does on Windows. I'm a professional plugins developer and I do all my coding on Mac. I blog about Eclipse and Mac related topics, so I invite to read it.
Adding to the limitations mentioned in other answers, if you have specific plugins that you need, not all support Macs, although most. For example, The Eclipse TPTP (short for profiler) project doesn’t profile on Mac. There are alternatives in most cases, though (AFAIK, not free in the case of TPTP).

Personal experience for RCP-development: 2G of RAM are not enough (at least not for our project), so the current MacBook Airs are not suitable at all for development. But then, you're talking about desktop Macs anyway, so if you can get the >2G, it should be fine.
During the 64bit transition phase, there were some glitches with missing 64bit Cocoa, but that has been resolved. Some of the extensions may be platform specific: currently, TPTP (Test and Performance Tools Platform Project) still has some limitation.

eclipse for mac works exactly as you know it from your pc. the only thing that differs is the arrangement of some keys (the # is on L, the arrangement of the braces differs a bit)

Eclipse works fine, but with different keybindings.
I have found that sharing files with other computers - e.g. through a source repository - may give you character set conversion issues. If you stay with pure ASCII in your source you should not have any problems.
You can download Eclipse 3.6.1 from eclipse.org directly (where your platform is autodetected) or from http://download.eclipse.org/eclipse/downloads/drops/R-3.6.1-201009090800/index.php#EclipseSDK
I would suggest getting the Java EE version from the frontpage. It contains web stuff I use regularily.

Related

Using Multiple JDKs on OSX Mavericks

On platforms like Windows and Linux installation of additional JDKs for development purposes is fairly trivial: download a compressed file, uncompress it in some out-of-the-way directory, point JAVA_HOME at that location, and invoke the files in its bin directory.
I'm trying to do the logical equivalent for OS X and am seeking the advice of Java gurus who might have a preferred way to do this on that doesn't tamper with the actual OS X environment. My end objective is to merely have several JDKs, historic and experimental, to choose from when using IntelliJ.
To be clear, I'm not trying to update the Java used by OS X, nor change the JRE that gets invoked by the browser. Each JDK that I've grabbed from the vendor seems to want to replace the OS's version, which is the exact opposite of what I'd like.
From past experience, OS X (while Unix under the hood) is actually a collection of cooperating applications that have been carefully selected for dependencies and version feature compatibility; upgrading a language or service can often have disastrous or unexpected consequences, thus sandboxing alternate versions seems the better approach, plus it makes projects immune from OS upgrades.
Any recommendations?
If you become a registered Apple Developer you will have access download different versions of the Java for OS X Developer Package which, I believe, can be installed concurrently.
Please note, you DO NOT have to join the Mac Developer Program (which costs $99). You only need to register as a developer, which is free.

Javax.comm API on 64-bit Windows

I am using the javax.comm API to help my program communicate with hardware over serial port. I am using the Windows 7 and NetBeans IDE 9.
I used the common Java program to check the available ports on my PC. The program compiled and ran without error. However it returned nothing.
What can I do to use the javax.comm API on Windows? It seems win32com.dll does not work with a 64-bit operating system.
This is how I got it to work.
I've tested it using JDK 1.6 (32bit) on my Windows 7 64bit machine.
Install 32bit JDK.
Copy 'win32com.dll' to JDK_HOME\jre\bin.
Copy 'javax.comm.properties'to to JDK_HOME\jre\lib.
Copy 'comm.jar'to to JDK_HOME\jre\lib\ext.
Now run your program and it should work.
Recent 2.2pre versions of RXTX include binaries for 64-bit windows. I think the latest RXTX information source has changed to this: http://rxtx.qbang.org instead of http://www.rxtx.org though.
At one point the RXTX library included drop-in support for using the javax.comm api. I'm not sure if it still does, but the main change then to use the "native" RXTX packaging was primarily just a package name change.
it seem the win32com.dll does not work with 64-bit Operating system
I think that is correct. In fact, according to the relevant download page, Oracle no longer supports the javax.comm API for any Windows platform.
However, I found this page which has a 64bit build of the DLL, among other things.
EDIT
By an astounding piece of research (i.e. following the links and reading stuff) I found the download page for the latest RXTX, which claims to have binaries for various platforms. If your platform is not there, try building from source. If that doesn't work, consider investing the effort in making it work.
I've integrated RXTX libraries into some of my earlier projects and i found out this bug it has while working with comm ports under windows, so you might want to check this first before going into some serious app design.
Communication works fine, never had any problem with that, but once you open the port you cannot close it and reopen, if you use method provided for closing port, your app just hangs, no exception no nothing. I found later the same behavior described by users on web, but never really found the solution to this problem.
Again, this might help you save some time, check it first.
Latest release, which is this http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip, doesn't have this issue no more. Unfortunately i think its solved only for windows, its still there on Linux binaries, and i haven't tried it on mac.
Have you got a look on RXTX ? I think it is still active.
I had this issue...on a 64 bit machine..running windows 7
a legacy application developed in jdk 1.4, for 32 bit windows... and using the win32 comm api binary
i tried the RXTX binary for 64 bit and i was able to communicate with my device on some level... but... there were other problems as my application referenced a version of the jpos library that internally was using the comm-api (had import javax.comm.*... in some Serial...Listener class)....
I installed a 32 bit jdk and setup the comm-api binaries for 32 bit windows as directed here...setup comm api on windows
all was fine afterwards
You might be interested at an alternative library I've authored: http://code.google.com/p/jperipheral/

what is the Best OS for Ruby on rails and Java Development? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
HI
I am studying computer applications (software development) and will graduate in a year, i will be taking a year off to get my coding skills up to scratch as i have recently come to love code and development. i tried getting rails working on my windows 7 machine but that was painful.
My question is, is it worth it to go out and buy a Macbook if i'm going to be doing a lot of code in rails and java? over the next few years? does it make life easier?
Lets hope this does not turn into a Linux vs Mac flamewar.
At work and on my private machines, I use Ubuntu/Linux for RubyOnRails and Java development.
Sure, under OS X you have many nice tools available (like TextMate), but there are many others in Ubuntu/Linux available too. For free.
GEdit can replace TextMate quite well when using the right plugins, and for big projects I would always prefer NetBeans (for Rails and Java).
Also Ubuntu's package management and package feeds make it very easy to set up a working development environment.
And finally:
Apple is really expensive, you will pay many bucks just for the logo on your device.
Ubuntu is absolutely free on the other hand and can run nicely on almost any hardware (200$ Netbooks for example).
My suggestion:
try out Ubuntu on your current device - if you don't like it you can still go for the white fruit. And don't even think about using Windows for Rails Development.
There's no need to go out and pay top dollar for Mac hardware. You can get a stacked and rock-solid Toshiba laptop, put the latest Ubuntu on it, and you'll have a great Rails devleopment system.
Ubuntu is the way to go man. You'll love the ease of use and installation, too.
UNIX variants, of course. Actually, Mac OS is very nice, because of TextMate and some similar tools.
Mac would probably ideal for Ruby, but for Java I'm not too sure. For Java, the safest bet would be either Linux or Windows. But Ruby on Windows (with regards to tools and utilities) is pretty dismal.. so for the best of both worlds I would go with Linux. The OS is free and there's no need for specific hardware, or to run a virtual machine.
I started using Ubuntu for Rails development a few weeks ago and have noticed a big improvement over Windows (although I still dual boot) due to the following:
Terminal in linux is alot more robust than command prompt
Rails commands seem to run faster in Ubuntu
vim is a nice lightweight editor
If your going to use an IDE, I would suggest NetBeans for Rails and Java.
I have always worked on Windows systems, mostly working on C++ and later C#. I started working with Ruby on Rails more than a year ago. I did that on windows, and actually that worked out pretty well for me (just make sure to use a ruby version from rubyinstaller.org).
Although lately i have switched employer, and i am developing on ubuntu 10.04, and i even switched my home-system. I would recommend Ubuntu 10.04, but there are some very valid reasons to keep using Windows as well (some commercial software totally not being available on Ubuntu).
I have worked with ruby on rails in ubuntu, mac OS X and windows. Windows only was the worse but I prefer it with a virtual machine loaded with a ubuntu server 10.04 (it helps you in deployment also, as the most servers have linux), I have samba - access to the ubuntu files through windows explorer and it is working like a charm. You also have snapshots to revert if you do something wrong (through virtual machine), so you can destroy and recover it very easily and keep backup without any problem. Also you can transfer it everywhere with just copy paste.
Mac OS X is also a good choice, but it isn't as good as ubuntu for me, I am used to windows graphical environment and the commands in the command line sometimes is a little different (mac OSX is unix, it isn't linux and it doesn't use X windows), so it is a little tricky to feel comfortable, you have to learn a lot more to get the productivity you already have with windows. Also textmate needs time to get used to it, so better invest in a better solution like vim or emacs.
I've had great results running Java under Ubuntu. The UNIX environment is great IMO for scripting, running web application servers etc. In your position it is probably also a useful skill set to acquire.
In the past I've also run quite a few of my Java applications on Macs. They ran perfectly well, but I wasn't totally satisfied with performance of the JVM. That may have well have improved in recent versions of course.
I prefer uBuntu
Lets remember there are a couple of uBuntu specific setups that are required. Here are a couple links:
https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm
http://gorails.com/setup/ubuntu is my favorite

Mac laptop usage and development discussion?

I bought a new Mac book (MacBook Pro), and I am previously using Windows. I use this MacBook for personal (e.g. instant messaging, document, browsing the web) and development (writing C++ and Java code) purpose. Any recommended discussion group or forums (or I can directly ask here in StackOverflow)? I am a newbie.
Yes, you may be interested in my Development Environment Setup guides. I currently develop on Mac OS X 10.6 Snow Leopard. My recommendation is to install Xcode and MacPorts. I tend to edit everything using Xcode, and I use MacPorts to install pretty much all the various libraries (except Qt, for which it is more sensible to downlod the precompiled Cocoa 32-bit and 64-bit binaries). In terms of developing such that things also work on Linux, as long as you conform to the Single UNIX Specification (i.e. use the authoritative manual pages at the link instead of Mac OS X's man pages) and, other than that, you rely only on cross-platform libraries, then you should be fine. That said, it is reasonable to install a copy of VirtualBox and setup an image of Ubuntu in it for verifying that your code compiles and runs under Linux.
Start with Xcode and Developer Tools, and then look at NetBeans and/or Eclipse.
Others have already commented about XCode and you commented "How about Java programs?" so for Java on OS X, basically every single Mac ships with Java since a very long time.
You MBP probably has Java 1.6.
Two very popular Java IDE on Macs are Eclipse and IntelliJ (I guess NetBeans works on Mac too but nobody here is using it and it's been a long time I haven't checked NetBeans, I'm a long time IntelliJ IDEA user).
In addition to that, OS X being a Unx OS you get very powerful shells and you may want to learn how to use a Unx shell (like, say, Bash).
Welcome and good luck!

What are good InstallAnywhere replacements for installing a Java EE application?

Which (commercial or free) installer tool would you recommend to replace InstallAnywhere as the installer for a Java EE application? What do you specifically like about it, and what are its downsides?
Some requirements:
Must support running custom Java code as part of installation procedure
Must support Windows, including latest 64-bit versions like Windows Server 2008; support for other target operating systems is a plus
Must be able to install a bundled application server (such as Resin or Tomcat) as a service on Windows
Must support basic stuff like copying and moving files around, editing configuration files, extracting ZIPs, etc.
(Must support bundling a specific version of JRE; at the very least by including a ZIP to be extracted)
Edit: a few more points:
Preferably does not depend on a preinstalled JRE (or any other 3rd party runtime environment or library) on target machine; in other words, can produce an independent Windows .exe (or .msi)
The tool should preferably be cross-platform so that installer development can be done on Linux, Windows, or Mac.
Should preferably have a decent GUI for putting the installer together. Once that is done, however, it must be possible to skip the GUI and make installer building part of automated build process.
In this case, unfortunately, SO didn't tell us much that we didn't know already (and indeed the tool we ultimately chose was not mentioned in any answer). However, I'm posting our experiences here, as they might be helpful to others later on.
We (quickly) evaluated the following installer tools, mostly by looking at their websites and browsing for other information on the web: Actual Installer, Advanced Installer, BitRock InstallBuilder, Inno Setup, Install Creator, Installer VISE for Windows, InstallShield, install4j, IzPack, NSIS, openInstaller, Scriptlogic MSI Studio, Smart Install Maker, Symantec Wise Installation Studio, and WiX.
We screened out most of them early on, and ended up shortlisting two options for closer evaluation: BitRock InstallBuilder and install4j. For these tools, we downloaded evaluation versions and did some prototyping, to see if the things that are most important to us are really supported, and how easy or hard it is to get things working.
Both of the options were good in many things (and both seemed good alternatives to InstallAnywhere):
They produce completely native and pretty Windows .exe installers that are
easy to customise with your own graphics etc.
Both tools could easily be automated so that installer building is triggered from Ant. (With install4j it literally took me just five minutes to learn it and then implement it.)
Both companies seem to have good support (well, at least for prospects evaluating their products ;-) Especially from BitRock we got very quick replies.
In the following things install4j seemed better than BitRock for our needs (many of these are subjective, of course, so YMMV):
install4j definitely has better support for running custom Java code - it can be done at any point during the installation, and regardless of whether there's any preinstalled JRE on the system.
BitRock uses a more hard-coded sequence of installation steps while install4j is more flexible. In install4j, adding custom screens and forms (with or without custom Java code), asking user for input, etc., can be done at any point, before or after installing any files.
Also some basic things like defining the filesets that are to be copied to the target system, and adding an installation step to replace certain strings in configuration files seemed somewhat easier in install4j.
install4j has better support for JRE bundling
When creating installers on Linux, the look & feel of install4j IDE was nicer (more "native") than that of BitRock
(install4j's licensing options were better for us - we strongly preferred a couple of floating licenses to named licenses for all developers or an expensive "site license")
So ultimately we went with install4j. Here are some more details on why it was impressive:
Its IDE, where you put the installer together, is very simple and easy to use - I could figure out how to do most things I wanted quickly, even without looking at documentation. And when I did have to check something in the documentation (e.g. how to refer to installer variables; how to get started writing custom Java code against the install4j API), it didn't take long to find what I needed.
You can completely customise the screens and actions during the installation procedure, and also add custom screens and actions (coded against their Java API) at any point. This was important to us because we need to reuse existing custom Java code from the old InstallAnywhere installer.
In some small details, install4j seems ideal for Java developers. For example, if you want to add a validation script to check some user input, you can code that very quickly in the install4j IDE itself, using plain old Java, with coding assistance resembling that of IntelliJ IDEA.
We deemed the cost of install4j floating licenses reasonable, considering how good the tool is (and downright bargain compared to the inflated pricing of InstallAnywhere...)
In short, it seemed like the best installer tool available for deploying Java applications.
We created BitRock InstallBuilder, a crossplatform installation tool after some frustrating experiences with InstallAnywhere and specially its cousin (now defunct) InstallShield MP. More than half of our clients use our tool to package Java-based software but the tool is native, not Java-based. That means we have a number of advantages such as native look and feel (incl. Vista, GTK, Qt, etc.) and no need to do self-extraction previous to installation (faster startup, less space requirements) to mention a couple. To answer your specific questions:
Supports calling Java code as part of the installation at multiple points in time (such as when a certain page is displayed, files being copied, at uninstall time, etc.). The code is not compiled in the installer, but it can be called externally and the result used in the installer. If you are more specific about which kind of code that you need I can provide specific sample code. We have a lot of built-in actions for functionality that needs to be manually added to other installers, so you may not need to write that code in the first place!
We support all versions of Windows, including 64bit and Windows 2008 (multiple customers have certified on those platforms using our installers)
We support bundled applications servers, including Tomcat, Resin, JBoss and others. Take a look at BitNami for examples of such stacks that we have created.
We support copying and moving files, substituting values in config files, unpacking files and most other common installation functionality. One of our principles is that the installer should provide built-in support for common installation actions and have an easy, clean interface for invoking external code that is specific to a client's product.
We support bundling JREs, as you mention is often enough just to bundle the JRE directory and setting the appropriate value for JAVA_HOME in the launching scripts
You can take a look at some of our customers such as MySQL, Samsung, Motorola, GitHub, etc. InstallBuilder is a commercial product, but we offer free licenses for open source projects and discounts for small business and microISVs.
Just want to add that my company has used InstallAnywhere for about 6 years but we have decided to move on. The reason is two fold.
First of all their pricing is absolute highway robbery and the licensing is severely restrictive compared to direct competitors like INstall4J and BitRock.
My other problem with InstallAnywhere is the product is only minimally maintained. I have been using the product for 6-7 years through many different versions and bugs are rarely fixed and you surely can't expect new features. Essentially all you can expect is that they will add support for the new version of windows/mac as it comes out. Their support charges are quite pricey, but I have never had a support request actually implemented. When I first bought the product I believe it was from a company called ZeroG who were focused solely on this product. They actually maintained and improved the product. Back then it was the only real ticket and they were leaps and bounds above the competition.
Then it was acquired by Macrovision and then Flexera. Ever since ZeroG sold the product it has been an ancillary product for the owning company and the focus on it has been poor. It seems like it was bought more to complete a suite of products rather than because the company actually wanted to maintain the product.
Word of caution, evaluate these products carefully because you can become tied to them. We would have left the product sooner, but we put so much effort into not just the installer, but setting up an automatic update scheme based on the features/limitation of the product that it is expensive to leave the product because of the labor investment to reproduce this in a new product.
Just my take, but I wouldn't recommend InstallAnywhere.
I can vouch for izPack. It's Ant-based so you can package up an Ant install in it, and that Ant install can contain custom tasks, and/or scripts written within your Ant build.xml (e.g. using Groovy, Beanshell or any BSF-enabled scripting language). So it'll cover your customisable requirement.
I've used it in the past for all the above - unzipping/services/custom code. It's multi-platform, although I can't vouch for that specific instance above (64bit Windows). But if it runs Java, you should be fine.
The one headache is the JRE. You'd obviously require some JRE to run this. However I think you should be able to pack up and execute a specific JRE installation within izPack.
Currently we are using GetDown to handle distribution of our swing applications. We use Tomcat to distribute updates and GetDown to download those updates. It's really flexible and powerful, and much better than java WebStart and because it produces check sum for changes it saves bandwith and downloads just changed files.
A good tutorial : http://www.hascode.com/2012/05/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/
Project website : https://github.com/threerings/getdown
Deployment in an multi-platform environment is always a big source of troubles. It think that the optimum solution would target the creation of native packages for all platforms, like RPM, DEB or MSI ... the ones that could be installed unattended also.
Developers should work on making the application self-healing and run without installation.
Doing so will payoff in minimize the deployment efforts.
I know this is not quite a solution as you where asking but sometimes you may get better results this way.
Remember that you'll get free updating service on Linux if you follow these.
I still hope Microsoft will add something similar to MSI (and that would not require you to register at them). Meanwhile for Windows you can take a look at Google Updater just released as open source - http://code.google.com/p/omaha/
They released a similar product for Mac OS http://code.google.com/p/update-engine/ but sad that they didn't think about creating one product from these two.
You can try the SetupBuilder Gradle Plugin to create a native *.msi installer with a simple Gradle build script.
It is free.
Supports 32 bit and 64 bit Windows. Also Linux and OSX.
Bundle the Java VM under Windows and OSX, does not required a preinstalled Java VM.
Can run Java Code before or after the installation.
Can create a windows service/daemon.
Has not a GUI but use Gradle. If you already use Gradle as build script language then it is very easy.
you may be interested in launch4j
Jonik, thanks for posting such detailed feedback of your experience. I wanted to write a follow up answer, since you raise some good points.
After certain base requirements are met (which unfortunately InstallAnywhere does not any more) there are not really 'bad' or 'good' tools, but rather tools that are better suited for some projects. It seems you studied carefully all options and install4j will work better for your project. This is probably a good choice, since you have an existing Java codebase from your previous installer that you want to reuse (though I would like to think some of that code would not be necessary with InstallBuilder :)
Regarding InstallBuilder, we support customizing the screen sequence using the <insertBefore> tag (we probably should better document this). It is also straightforward to bundle a JRE (just including the java/ folder in most cases) but I think your criticism is valid: since this is a common task we should do a better job at documenting / making it accessible though the GUI, including drag-and-drop in all supported platforms. We already have in our roadmap improving the GUI in the areas you mention. The funny thing is that a lot of our customers find the XML format so easy to use that they prefer editing it using their programming editors (as if they were editing HTML)
Finally, regarding licensing, our current model does not require purchasing additional licenses if those extra programmers will just be building the installers (not designing them) or purchasing extra licenses for build or continuous integration machines. In any case, a couple of floating licenses for install4j are more expensive than a full Enterprise Site license for BitRock:)
Thanks again for the feedback
I recommend having a look at cmInstall, which can be found at
http://sourceforge.net/projects/cminstall/
It meets almost all your requirements and it's open source. Plus I'm one its developers :).
[yes] Must support running custom Java code as part of installation procedure
[yes] Must support Windows, including latest 64-bit versions like Windows Server 2008; support for other target operating systems is a plus
[can be easily done by using 3rd party libs- e.g.:Tanuki Software] Must be able to install a bundled application server (such as Resin or Tomcat) as a service on Windows
[yes]Must support basic stuff like copying and moving files around, editing configuration files, extracting ZIPs, etc.
[yes - or you can programatically download & unzip it ]Must support bundling a specific version of JRE; at the very least by including a ZIP to be extracted
6.[no - it needs jdk 1.6 installed, support for .exe or .msi is planned for future]Preferably does not depend on a preinstalled JRE (or any other 3rd party runtime environment or library) on target machine; in other words, can produce an independent Windows .exe (or .msi)
[yes] The tool should preferably be cross-platform so that installer development can be done on Linux, Windows, or Mac.
7.[no - the cminstall framework is "developer based" - but easy to use.Just read the tutorials from http://sourceforge.net/project/showfiles.php?group_id=250019&package_id=305489 and see how easy it is to build an installer!] Should preferably have a decent GUI for putting the installer together. Once that is done, however, it must be possible to skip the GUI and make installer building part of automated build process.
I have also reveiwed few of the open source multi platform installers. Here is my comment:
BitRock InstallBuilder: Only Great for free and open source developers as it gives free license for use in open source projects.
InstallJammer: Good free and open source multi platform installer. Only one concern that as soon as one downloads the executable build from InstallJammer, the anti-virus program will immediately delete it. Somehow files built from InstallJammer are being caught as False Positives. You will have to work a bit more security certificate before publishing.
Izpack: Good free and open source multi platform installer. It may be a bit cumbersome for people not used to with ant. May be great when used with GUI front-ends like PackJacket.
I've seen several people recommend IzPack, but I honestly don't know if it meets your requirements. It's at least free :)
Sun offers an open source installer:
OpenInstaller
I'm sure that all your requested features are supported.
But it seems for me a little too hard to configure.
But guess what: It has not only a GUI but also a (pseudo-graphic) CLI.
Nice screenshots and info here.

Categories

Resources