Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to correctly start a JAVA application




On Sep 10, 2005, at 10:34 AM, Thomas DeGregorio wrote:

In class I'm taking a JAVA programming class, however, of coarse I never programmed in JAVA before and I can't seem to figure out how to start a project with xcode. My text book and prof. say that JAVA applications are extension java, then once compiled they're extension class. Now All I see in xcode is extension JAR files. I have no clue what those are, but they're not what I'm looking for. Does anyone code JAVA applications, that I can tell me how to create a project from xcode properly? Unless I have to download a xcode plugin, I'm just not sure what to do.
Thanks for all help,
Tom

A .jar file is a Zip file full of .class files. If you know the main class's name, you can run it from Terminal with:


java -jar TheJarFile.jar YourMainClassName

Or you can just do Build->Build & Run (Cmd-R) from within Xcode and it should run the Java project for you if it's properly set up.

To create a proper Java project in Xcode, use the Java Tool project type. If you need any third-party libraries (probably not this early in the class), that's where Xcode gets a little tricky, and why many don't like it for Java development. There are other IDEs that are better for Java programming (BlueJ, JBuilder, Netbeans, Eclipse), or as suggested, use a nice text editor (may want to consider jEdit (http://www.jedit.org)) and the terminal.

Good luck,
Logan Allred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Student-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/student-dev/email@hidden

This email sent to email@hidden
References: 
 >How to correctly start a JAVA application (From: Thomas DeGregorio <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.