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!
Related
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.
Can anybody give me suggestions about preparing a custom Mac Installer for a Java swing application. I have tried Xcode but of no use. Any suggestions would be really helpful.
Thanks in advance...
Take a look at http://izpack.org.
IzPack-generated installers only require a Java virtual machine to run. It is fully cross-platform and generates a single installer. As such, it is an alternative to native solutions like as platform-specific installers and package managers.
Or for a more Mac-specific option, see this 10-step tutorial:
http://www.centerkey.com/mac/java (Updated for Mac OS X 10.6 — Snow Leopard)
Do you actually need an installer? Unless you need to put files in very specific locations and need admin privileges for that, installers are uncommon on the Mac. Typically, you'd use a disk image with a self-contained application bundle. See my answer to this question. That answer also mentions how to create a standard OS X installer.
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.
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
A Java6 application sits in the system tray. It needs to be activated using a hotkey (e.g. Super-G or Ctrl-Shift-L etc) and do something (e.g. showing an input box).
How do I do that on:
Windows (XP or Vista)
OS/X
Linux (Gnome or KDE)
I've compiled a library for global hotkeys in java using JNA. It currently supports Windows, Linux and Mac OSX. It also supports media keys on windows and linux.
if anyone is interested, try https://github.com/tulskiy/jkeymaster
I would appreciate any feedback.
Thank you.
For Linux (X11) there is JXGrabKey: http://sourceforge.net/projects/jxgrabkey/
There is also a tutorial for grabbing a global hotkey on Linux: http://ubuntuforums.org/showthread.php?t=864566
I didn't though find a solution for OS X yet.
To build something for all 3 platforms I'd suggest stripping down JIntellitype (it's Apache license) to it's global hotkey functionality and extending it with the OS X and X11 functionality...
It seems that this is not doable in a cross-platform fashion without using the native interfaces.
On Windows, you can use the free JIntellitype library.
If anyone wants to do the OSX or Linux versions of the JNI part of Jintellitype I would be more than happy to add those to the JIntellitype library.
Melloware
http://www.melloware.com
I found this solution to work just great on windows. It does not require you to install any software like JIntelliType. Note that this is 32 bit dll and you can recompile for 64-bit JVM is do desire. All credits to original author of the blog.
I've written a Java library for global key/mouse events here. This works for Windows, Linux X11, and OSX.
https://github.com/repeats/SimpleNativeHooks