Skip to main content



      Home
Home » Newcomers » Newcomers » Newbie classpath woes ...
Newbie classpath woes ... [message #100630] Fri, 09 September 2005 02:45 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 project’s 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
Previous Topic:"Stuck" eclipse project won't load, need help debugging Eclipse project creation
Next Topic:C++ help please
Goto Forum:
  


Current Time: Tue Jul 15 17:08:41 EDT 2025

Powered by FUDForum. Page generated in 0.05797 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top