Discussion:
How to import Java packages into XCode projects
(too old to reply)
Lars A. Gundersen
2006-01-31 15:27:20 UTC
Permalink
Trying to take first fumbling steps with Java, and has only used Xcode
for Applescript before.... Can someone explain just where I must place
the files of a package I want to import into a Xcode Java project, so
that the statement in the .java sourcefile:
import ThisJavaPackage.*;
does not trip up the compiler with a "doesn't exist" error? have tried
many different places, including what I thought to be the most likely
candidate; /Library/Java/Extensions/ without any luck. Hope someone can
help a Xcode-Java beginner.

Lars
--
Lars A. Gundersen
Multimedia Designer
http://www.larsagundersen.no/ +4791644610
Patrick Machielse
2006-01-31 18:52:24 UTC
Permalink
Post by Lars A. Gundersen
Trying to take first fumbling steps with Java, and has only used Xcode
for Applescript before.... Can someone explain just where I must place
the files of a package I want to import into a Xcode Java project, so
import ThisJavaPackage.*;
does not trip up the compiler with a "doesn't exist" error? have tried
many different places, including what I thought to be the most likely
candidate; /Library/Java/Extensions/ without any luck. Hope someone can
help a Xcode-Java beginner.
You can specify the path to your library with the javac -classpath
option. To do this, double-click on your target and look under 'Java
Compiler Settings' -> 'Other Java Compiler Flags'.

Just adding the lib to the root folder of your project might work too.

patrick

Loading...