Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 23, 2009, 02:34 AM   #1
Watabou
macrumors 68020
 
Watabou's Avatar
 
Join Date: Feb 2008
Location: United States
Java in Xcode 3.2?

I just downloaded Xcode 3.2 and found out that there's no Java templates. I searched and found that I can go to the Organizer and open a Java tool project from there.But I don't know where to go from there. I tried creating a test file consisting of a simple for loop in the java tool project and tried running it but it instead runs a Hello World class. Am I doing something wrong?

I'm trying to learn java and I'm in a beggining java class in college. And please don't suggest Eclipse or any other IDE. I have my own reasons for trying out Xcode.
__________________
Haswell 15" rMBP, 2.3GHz, 16GB, 512GB SSD, 750M
iPhone 5
Early 2008 MBP, iPhone 3GS (retired)
Watabou is offline   0 Reply With Quote
Old Oct 23, 2009, 03:34 AM   #2
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Quote:
Originally Posted by Watabou View Post
I tried creating a test file consisting of a simple for loop in the java tool project and tried running it but it instead runs a Hello World class. Am I doing something wrong?
Yes. You need to edit the source file in the src directory that is included in the Java Tool project. Or delete it.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   0 Reply With Quote
Old Oct 23, 2009, 02:13 PM   #3
Watabou
Thread Starter
macrumors 68020
 
Watabou's Avatar
 
Join Date: Feb 2008
Location: United States
There's one java file in the src folder called Java_Tool.java. If I try to edit that or delete that file and add a file of my own in the src folder, and try to run it, it gives me an error that says build xml not found.
__________________
Haswell 15" rMBP, 2.3GHz, 16GB, 512GB SSD, 750M
iPhone 5
Early 2008 MBP, iPhone 3GS (retired)
Watabou is offline   0 Reply With Quote
Old Oct 25, 2009, 03:05 PM   #4
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by Watabou View Post
I tried creating a test file consisting of a simple for loop in the java tool project and tried running it but it instead runs a Hello World class. Am I doing something wrong?
If you want to run a different main class, you have to edit the Manifest file under "resources" in the Organizer project. At a minimum it should contain:

Code:
Main-Class: YourClassnameHere
If your main class is defined in a package, such as:

Code:
package my.fun.pkg;

public class MyMain
{ ...main method here... }
Then YourClassnameHere would be this fully qualified class-name: my.fun.pkg.MyMain
chown33 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting 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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
iOS 4.2.1 not supported in Xcode 3.2.5 jacksongan iPhone/iPad Programming 8 Jan 18, 2011 06:32 PM
iPad Simulator 3.2 in Xcode 3.2.5 thepost iPhone/iPad Programming 1 Dec 1, 2010 03:37 PM
JAva templates in xcode 3.2 frustrated007 Mac Programming 6 Oct 26, 2009 11:02 AM
Application developed in XCode 3.1.3 - OS X 10.5.7 crashing in XCode 3.2 - OS X 10.6 Monaj Mac Programming 9 Sep 8, 2009 05:03 AM
iPhone OS install option unavailable in XCode 3.2.1 El-Presidente iPhone/iPad Programming 6 Jun 17, 2009 08:15 AM


All times are GMT -5. The time now is 10:59 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC