• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

Sign in to follow this  

XCode help?

Recommended Posts

Knight'    0

Hey guys,

I'm learning Java at the moment, and our university teaches the course in the BlueJ IDE. It's an easy to use IDE for Java, but I'de really like to try and use XCode. I have a couple of questions.

What project would I need to select for a simple terminal based Java application?

How do I make objects, and input parameters?

Share this post


Link to post
Share on other sites
MegaManXcalibur    0

If you want to make a simple command line in Java create a new project and select "Java Tool" under the java section.

By creating a new object I'm going to assume you mean files (because if you haven't learned it already your Java class should cover objects and other object oriented design elements some time). To create a new file simply go to File->New File... and select "Java Class" under the "Pure Java" section.

Finally by input parameters I'm going to assume you mean command line arguments. In the left-hand pane there of the main Xcode windows (which won't appear until you have created your project) there should be a section labeled "Executables." Expand that and you should see your executable file (which won't appear until you have run build on your project at least once) and Ctrl+Click on the executable.

From the submenu select "Get Info" and a new windows will appear. There should be a tab labeled "Arguments" and you can add in command line arguments from here.

I hope that helps.

Share this post


Link to post
Share on other sites
Dav-id    5
Hey guys,

I'm learning Java at the moment, and our university teaches the course in the BlueJ IDE. It's an easy to use IDE for Java, but I'de really like to try and use XCode. I have a couple of questions.

What project would I need to select for a simple terminal based Java application?

How do I make objects, and input parameters?

586753996[/snapback]

Which university are you at? I am 1st year CIS student at University of Bath

I am in a similar position and decided to ditch BlueJ in favour of XCode.

Share this post


Link to post
Share on other sites
thetechroom    0

very n00bish question guys, i've never used XCode, where do I find Xcode and how do I use it to create java files and classes?

Share this post


Link to post
Share on other sites
MegaManXcalibur    0

Xcode is located on the Mac OS X CD. All you have to do is put the CD in and install the developer tools which will create a new folder one your system called Developer which Xcode will be located in (also Xcode may already be installed so check to see if there is a Developer folder on your drive before installing).

You can also download the latest version of Xcode here...

http://developer.apple.com/tools/

Do note you will need to register an Apple Developer Connection account which is free.

Once you have it installed you can do the steps I mentioned above to create Java projects and class files.

Share this post


Link to post
Share on other sites
thetechroom    0

oh sweet, I thought it was something more than I expected, thanks alot buddy (Y)

Share this post


Link to post
Share on other sites
Knight'    0
Which university are you at? I am 1st year CIS student at University of Bath

I am in a similar position and decided to ditch BlueJ in favour of XCode.

586762719[/snapback]

I'm a first year Economics and Maths student at Kent University :-)

Add me to your iChat and we can talk XCode together :-)

mattwilko

Share this post


Link to post
Share on other sites
Knight'    0
Which university are you at? I am 1st year CIS student at University of Bath

I am in a similar position and decided to ditch BlueJ in favour of XCode.

586762719[/snapback]

I'm a first year Economics and Maths student at Kent University :-)

Add me to your iChat and we can talk XCode together :-)

mattwilko

Share this post


Link to post
Share on other sites
Knight'    0
If you want to make a simple command line in Java create a new project and select "Java Tool" under the java section.

By creating a new object I'm going to assume you mean files (because if you haven't learned it already your Java class should cover objects and other object oriented design elements some time).? To create a new file simply go to File->New File... and select "Java Class" under the "Pure Java" section.

Finally by input parameters I'm going to assume you mean command line arguments.? In the left-hand pane there of the main Xcode windows (which won't appear until you have created your project) there should be a section labeled "Executables."? Expand that and you should see your executable file (which won't appear until you have run build on your project at least once) and Ctrl+Click on the executable.

From the submenu select "Get Info" and a new windows will appear.? There should be a tab labeled "Arguments" and you can add in command line arguments from here.

I hope that helps.

586761022[/snapback]

BlueJ allows you to make objects of a given class, and input parameters of someMethod(int y, int x) rather simply. Is there a better way to do this other than setting up arguments of the executables launch in XCode?

Edited by Knight'

Share this post


Link to post
Share on other sites
MegaManXcalibur    0
BlueJ allows you to make objects of a given class, and input parameters of someMethod(int y, int x) rather simply. Is there a better way to do this other than setting up arguments of the executables launch in XCode?

586805264[/snapback]

I've never used BlueJ before so I'm not exactly sure what you are refering to. But if you just want to make objects then you can ignore everything I said about input paramters.

By the sounds of it you want an easy want to create an instance of a class and test it's methods. The simplest way to do this is to create an instance of the said class in the main method and pass in any parameters you desire to the methods you want to test.. For example if you wanted to create a method called testMethod(int, int) that was in the class Test you would do something like this...

public static void main(String[] args) {
     test = new Test();
     test.testMethod(0, 1);
}

But Xcode, as far as I know, doesn't have much in the way of allowing you to just create an object out of the blue and test the methods. You have to do via using code.

And since you mentioned iChat let me just say feel free to contact me via iChat and I'll help you out as much as I can.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.