Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / March 2008



Tip: Looking for answers? Try searching our database.

Building a Java tool in Xcode.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 08 Mar 2008 03:03 GMT
Hi:

Does anyone know how I pass arguments to my Java tool target when I do
Build and Go? I need to pass in a port number (int)?

Thanks,
Jason.
vze35xda@verizon.net - 09 Mar 2008 02:00 GMT
> Hi:
>
[quoted text clipped - 3 lines]
> Thanks,
> Jason.

Can you access ARGC, ARGV (i.e. command line arguments) in Java ?  If
you can then you can point to the executable in the XCode project
window and do Get Info, there you get a dialog box that allows you to
set command line arguments.

I am a total idiot in Java but I do have a Java app running under
XCode and the above works (but I don't know how to get at the
arguments).

--jim
NixDragon - 14 Mar 2008 20:39 GMT
> Hi:
>
> Does anyone know how I pass arguments to my Java tool target when I do
> Build and Go? I need to pass in a port number (int)?

public static void main(string[] args)

It's like C-style argument lists, you could simply hard-code args[0]
or [1] (not sure) to be the port number. But you probably want to use
an automatic library.
John Holt - 19 Mar 2008 01:50 GMT
> Hi:
>
[quoted text clipped - 3 lines]
> Thanks,
> Jason.

If you select Project->Edit Active Executable you will find a page that
lets you enter the command line arguments.

Hope this helps,

Signature

John Holt

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.