Java dev in XCode & CLASSPATH
Java dev in XCode & CLASSPATH
- Subject: Java dev in XCode & CLASSPATH
- From: Brooke Smith <email@hidden>
- Date: Wed, 14 Jul 2004 21:37:37 +1000
Dear Xcode-users,
I'm sorry to have to ask this but I've searched everywhere for an
answer: How do you get XCode to honor Java's $CLASSPATH (or similar)?
I have created .class files that I have placed in a package that are
compiled correctly but aren't found at runtime when run under XCode
(but are under the command-line version of Javac/Java).
Here is a (slightly modified) copy of the post I posted at
http://forums.macrumors.com
http://forums.macrumors.com/showthread.php?p=916893#post916893
Note that I have upgraded to XCode 1.2 and it is still the same!
----
Dear all,
A previous post said that XCode defaults to finding .class files (and
.jars also?) in paths returned with:
javaconfig DefaultClasspath
I am currently using XCode 1.1 and it would appear that these other
paths are only used by javac (the compiling arm) and not the java
runtime. I have created a package and saved it to /Library/Java (in the
DefaultClasspath). The build/compile process finds this OK, but when I
run the project the java.lang.NoClassDefFoundError error is returned.
Whatever javac is using, java isn't!
I can still run the command-line version - it of course uses
$CLASSPATH. I set my $CLASSPATH to include `javaconfig
DefaultClasspath`. I use javac to compile and it completes
successfully. I change CLASSPATH to NOT INCLUDE /Library/Java and then
try to execute the java app with java. The
java.lang.NoClassDefFoundError error is returned. This is the evidence
for me to say that in XCode (it appears that) the runtime doesn't use
the DefaultClasspaths.
I will upgrade to XCode 1.2 to see if the issue is fixed in that
version, however I have read the release notes and it doesn't mention
anything about this (mind you any fix could have come in a dot
release). If this doesn't fix the problem I will submit a bug report
through the means mentioned in the release notes.
If anyone has any input to this situation I'd appreciate the
discussion.
Cheers,
Brooke
--
Brooke Smith <email@hidden>
Go directly to jail. Do not pass Go, do not collect $200.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.