Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2004

Tip: Looking for answers? Try searching our database.

Compilation Problems

Thread view: 
Coco - 16 Apr 2004 04:34 GMT
Hi,

I believe I have a problem that is machine specific.  I have several
java programs that compile fine on one machine but when I take them to
another I get the Java:16: Cannot resolve symbol error.

I was thinking it was the path variable but I did set it up per the
Installation instructions for the Java sdk on Sun's website.

Here's the User Path Variable:

C:\Program Files\FastObjects_Trial\runtime\bin;C:\Program
Files\FastObjects_Trial\bin;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin

Here is the System Path Variable:

%SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\COMMAND;C:\ATF;%SYSTEMROOT%\system32\WBEM;C:\Program
Files\FastObjects_Trial\runtime\bin; C:\Program
Files\FastObjects_Trial\bin;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin

For each program it doesn't recognize a class that is compiled in the
same directory.  Again, these are all programs that can run just fine
on other machines. The directories specified in the path do exist and
are spelled correctly. (I've checked several times).

Any ideas would be appreciated!

Thanks. :)
Roedy Green - 16 Apr 2004 05:25 GMT
>C:\Program Files\FastObjects_Trial\runtime\bin;C:\Program
>Files\FastObjects_Trial\bin;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin

traditionally you put .; on the classpath as well to allow searching
the current directory.  

See http://mindprod.com/jgloss/classpath.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Bjorn Abelli - 16 Apr 2004 07:44 GMT
"Coco" wrote...

> I was thinking it was the path variable but I did set
> it up per the Installation instructions for the Java
> sdk on Sun's website.

Don't confuse the path variable with the classpath.

The error:

>  Java:16: Cannot resolve symbol error.

...indicates that nothing is wrong with the "path", as it finds the
compiler.

However, it indicates that it can't find a special symbol, which in this
case most probably is depending on where your classes are to be found.

The common approach is to set the classpath at compiletime (with the javac
command) as well as runtime (with the java command) with e.g. the -classpath
switch.

// Bjorn A


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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.