New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Java and xcode

Post Reply New Thread Subscribe

Thread Tools
Posts: n/a

I'm new to Java and xcode and I need some help.
I'm trying to make a server application and client application. I can do it on a pc but I was wondering how to do it in xcode. This is my client program:

public class Noland4 {
public static void main( String[] args ) {
if ( args.length < 1 ) {
System.err.println( "This does not work" );

try {
System.out.println ("Please type a message: ");
BufferedReader input = new BufferedReader(new
InputStreamReader (;
String s = input.readLine();
Socket sock = new Socket( args [0], 1234);
PrintWriter out = new PrintWriter( sock.getOutputStream() );
out.println( s);
BufferedReader in = new BufferedReader(
new InputStreamReader( sock.getInputStream() ) );
String t = in.readLine();
if ( t !=null )
System.out.println( "To server: "+ s +
"\nFrom server" + t );
} catch( IOException e ) {System.err.println( e ); }

When you run the code on a PC you enter in the command below, telling it to run the application and the IP address of the server. But when I run it in xcode I am not sure how to tell the application the IP address of the server to send or recieve anything.

c:java "name of the file" "ip address"
QUOTE Thanks
Posts: n/a

Don't Worry about it I figured it out!

QUOTE Thanks

Post Reply New Thread Subscribe

« Free C++ compilers | Xcode building apps »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
languages in xCode zanoncello OS X - Development and Darwin 2 10-05-2007 12:41 AM

All times are GMT -4. The time now is 11:15 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?