Use .java source to create new project

applemaz

Registered
I have 7 .java source files and want to simply create a new project in Xcode which will suck these .java source files in, compile them to .class files and run them.

After that works, I want to start coding additional classes within this project. What are the steps for bringing my 7 .java source files into Xcode? By the way, one of the 7 has a Main method so I don't need one.

Mike
 
Create the project then add the files to the project.

Creating a project in Xcode 3.2 (the one that ships with Snow Leopard)

  1. Open the Organizer by choosing Window > Organizer.
  2. Click the + button at the bottom of the Organizer.
  3. Choose New From Template > Java Templates.

If you're using an earlier version of Xcode, choose File > New Project to create a project. Use a Java Tool project if you're writing a command-line program. Use a Java Application project to write a GUI program.

Now it's time to add the source code files to the project. In Xcode 3.2, drag your source code files to the src folder in the Organizer. In earlier versions of Xcode, select the src folder from the Groups and Files list on the left side of the project window. If you don't see a src folder, click the disclosure triangle next to the project name at the top of the Groups and Files list. After selecting the src folder, right-click and choose Add Existing Files to add the source code files to your project. After adding the files to the project, you can delete the source code file that was created when you created the project.
 
Back
Top