Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Learning JAVA and new to XCODE

Learning JAVA and new to XCODE
Thread Tools
nibeck
Forum Regular
Join Date: Jan 2001
Status: Offline
Reply With Quote
Mar 24, 2004, 06:12 PM
 
OK, been a developer for a while, mostly server side scripting with PERL/PHP, UNIX scripting, etc. Been teaching myself JAVA, and would love to start using XCODE as an environment.

Now, I have a series of simple JAVA classes defined, and I can compile/run them from the command line using 'javac -classpath <> -d <>' command and execution using 'java -classpath' comamnd.

I would like to set this up as a simple project within XCODE to code and run these, but the project options and configurations are totally confusing me.

What's the easiest way to set up a simple JAVA app that prints stufff out to system.out.println within XCODE?

_mike
     
depolitic
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Mar 24, 2004, 10:14 PM
 
I would not bother with XCode and Java development. XCode has really bad support for Java, better going with NetBeans, Eclipse or Intellij IDEA (my favourite) as these are focused Java IDE's that make XCode look like an emaciated victim of famine in terms of features.

XCode is only of value if you are doing Cocoa or Carbon. Apple sees Java as a cross platform option however they would prefer if you were to develop for Cocoa or Carbon only..
     
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Mar 25, 2004, 03:18 PM
 
What he said. I just use ant to compile and build, and I use either BBEdit or XCode as an editor only.
     
Catfish_Man
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Mar 25, 2004, 05:14 PM
 
Eclipse rocks if you've got a quick machine.
     
JNI
Forum Regular
Join Date: Oct 2002
Location: Left Coast
Status: Offline
Reply With Quote
Mar 26, 2004, 02:38 AM
 
I have to disagree with the assertion that Xcode can't be used for 'real' Java development. I have used it to create a number of small and medium size apps, AWT, Swing and command line, and haven't had any significant problems or limitations. Granted, Eclipse has some cool features, but it has lots of issues that I just can't deal with. First, it is slow (at least on both my DP500/1G RAM and TiBook 1G/1G). It doesn't act like a true OS X app in many cases. It has tons of features, but I don't use 98% of them. Xcode can easily build double clickable .app bundles, with direct easy support to add things like a custom icon for the app, setup properties that should be set in any OS X. Of course YMMV.

Since the original poster is looking to do pretty basic command line Java tools, probably doesn't need all the refactoring, complex class browsing and such, I think Eclipse is total overkill for that kind of application, and probably would slow down the poster's development. It would be like using Word to write a simple document or an e-mail.

As far as Xcode's learning curve, it is not necessarily newbie easy, but it is not that bad. I think that about a week or two spent learning it's basic structure and configuration model, and it will all fall into place with no real problems or surprises. It will work like you would think any Mac app should. Again, YMMV.

To make a command line app, just use the Xcode Java Tool template to create a new project. Without any extra configuration, you should be able to fill in your app. As soon as you want to do things like add extra libs, or extra resource files and such, you may need read a bit of the integrated manual, which is pretty good. But for the most part, things will work as you might expect. If you have specific problems with your configuration, post them and they can be worked through.
     
benguru
Fresh-Faced Recruit
Join Date: May 2002
Status: Offline
Reply With Quote
Mar 27, 2004, 04:48 PM
 
Hi,
I use eclipse to program java. It is very good, has all the features you could need, and it pretty fast. IntelliJ could be good, but it is over $400 unless I am missing some discount, and I don't want to pay $400 for something that speeds up my devlopment process
     
depolitic
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Mar 27, 2004, 10:21 PM
 
In this age of free IDE's it may be hard to justify paying for an IDE however Intelij IDEA is a steal at $400 and worth every sent. The guys at eclipse have one the Best IDE category since they came out year after year. Beating the like of Borland which can cost over $7000 for the full version that Intelij can do for $400.

I recommend that you download it and try it out with a 30 day trial. You may not have the money to keep it but definitely will want it. As the Intelij team say "develop with pleasure".

I have used every IDE on the planet, and I cannot use nothing else but Intelij IDEA now. I am more productive, happier, their re-factoring rules, excellent plug-in support, great industry support. Fast Fast fast. Looks as native as a Mac app as a Java app can be.

Here is an example of what I love about Intelij IDEA,

1- type -- new GetTime.timeNow();

And if you do not have GetTIme class or timeNow methods it will ask you if you want to create them, if yes it creates the correct files and writes the outline of the classes and methods needed all with the correct constructors and arguments.

2- Real time validation of code: if you make an error a red line appears in the right margin, if you click on the red line it will tell you what is wrong with your code, And will offer to fix it for you 9/10 times. Since I use Intelij IDEA I now never get compile time or run time errors it speed up development 10 fold.

3- If you use a method that throws error Intelij will write all the error checking code to handle any exceptions thrown for you a boring and labours task, that nobody likes.

Look past the price and pleasure yourself.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:11 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,