Newbie classpath woes ... [message #100630] |
Fri, 09 September 2005 02:45  |
Eclipse User |
|
|
|
Originally posted by: not_spam_pete.boxflat.net
Hi,
I've looked ad infinitem for fix to my problem. A number of people have
asked the same basic question, the cure seems simple enough but it won't
work for me.... it must be my lack of experience ... anyhow
I can compile a simple Java program with no problems on the command line:
The MyUtil class lives in C:\Mywidget\MyUtil.jar
My classpath is set to .;C:\
compiling with
javac avago .... no prob
It runs no worries
The avago.java is ....
import MyWidget.MyUtil;
public class avago {
public static void main(String args[]) {
MvUtil obj = new MyUtil("Hello, World!");
}
}
Now when I create a Java project in Eclipse nowhere obvious can I find
where I can set the classpath to be the same as the environment version
above. Looking at this newsgroup, I see that I am to set up both a compile
time classpath and a run time classpath. The trouble is whenever I do this
I cannot get the compile time to work. I get an error stating the import
statement cannot be resolved. No worries they say ... just add the jar
file via a classpath variable, try as may I cannot get this to work.
Where in Eclipse can I simply state that I want the classpath to be as
/;C:\ as my standalone compile enables?
Thanks
|
|
|
Re: Newbie classpath woes ... [message #100929 is a reply to message #100630] |
Fri, 09 September 2005 14:58  |
Eclipse User |
|
|
|
Originally posted by: no_spam_sebastien.nault.loto-quebec.com
Hello Pete,
To change a project's classpath, right-click on the
project-->Properties-->Java Build Path. What you see within these tabs
will serve Eclipse to build its classpath. In the Source tab you should
see your projects name followed by the folder in witch your code is
located...
Good luck
Sebastien
Pete wrote:
> Hi,
> I've looked ad infinitem for fix to my problem. A number of people have
> asked the same basic question, the cure seems simple enough but it won't
> work for me.... it must be my lack of experience ... anyhow
> I can compile a simple Java program with no problems on the command line:
> The MyUtil class lives in C:MywidgetMyUtil.jar
> My classpath is set to .;C:
> compiling with
> javac avago .... no prob
> It runs no worries
> The avago.java is ....
> import MyWidget.MyUtil;
> public class avago {
> public static void main(String args[]) {
> MvUtil obj = new MyUtil("Hello, World!");
> }
> }
> Now when I create a Java project in Eclipse nowhere obvious can I find
> where I can set the classpath to be the same as the environment version
> above. Looking at this newsgroup, I see that I am to set up both a compile
> time classpath and a run time classpath. The trouble is whenever I do this
> I cannot get the compile time to work. I get an error stating the import
> statement cannot be resolved. No worries they say ... just add the jar
> file via a classpath variable, try as may I cannot get this to work.
> Where in Eclipse can I simply state that I want the classpath to be as
> /;C: as my standalone compile enables?
> Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.05797 seconds