public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Setting classpath to include junit
@ 2009-03-24 22:01 Carl
  2009-03-25  9:36 ` Andrew Haley
  0 siblings, 1 reply; 3+ messages in thread
From: Carl @ 2009-03-24 22:01 UTC (permalink / raw)
  To: java

Hi, I couldnt find a java-help mailing list like there is for
gcc-help, so I hope this is the right place to post. Im trying to use
gcj from the command line to compile a java assignment for university,
but i cant seem to work out how to add junit to my build path (is that
a java-y term, idk). Anyway, I can compile using gcj as long as I dont
go outside the scope of libgcj.jar. Im using a debian system, and I
have a directory called /usr/share/java/ which contains junit.jar. Ive
tried virtually every permutation of CLASSPATH, with things like
export CLASSPATH=/usr/share/java/junit.jar
and so on. Anyway, regardless of what i do i keep getting a
LinkedDequeTest.java:3: error: The import org.junit cannot be resolved
        import org.junit.Test;
I gave in and installed the sun javac, only to get a similar error message.
LinkedDequeTest.java:3: package org.junit does not exist
import org.junit.Test;
So im hoping that its just a problem with my configuration. Ive
already purged sun java and vrms is slightly less mad at me. Thanks
for any help, I just cant seem to figure this one out on my own.

-- 
Carl

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Setting classpath to include junit
  2009-03-24 22:01 Setting classpath to include junit Carl
@ 2009-03-25  9:36 ` Andrew Haley
  2009-03-25 14:24   ` Carl
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Haley @ 2009-03-25  9:36 UTC (permalink / raw)
  To: Carl; +Cc: java

Carl wrote:
> Hi, I couldnt find a java-help mailing list like there is for
> gcc-help, so I hope this is the right place to post. Im trying to use
> gcj from the command line to compile a java assignment for university,
> but i cant seem to work out how to add junit to my build path (is that
> a java-y term, idk). Anyway, I can compile using gcj as long as I dont
> go outside the scope of libgcj.jar. Im using a debian system, and I
> have a directory called /usr/share/java/ which contains junit.jar. Ive
> tried virtually every permutation of CLASSPATH, with things like
> export CLASSPATH=/usr/share/java/junit.jar
> and so on. Anyway, regardless of what i do i keep getting a
> LinkedDequeTest.java:3: error: The import org.junit cannot be resolved
>         import org.junit.Test;
> I gave in and installed the sun javac, only to get a similar error message.
> LinkedDequeTest.java:3: package org.junit does not exist
> import org.junit.Test;
> So im hoping that its just a problem with my configuration. Ive
> already purged sun java and vrms is slightly less mad at me. Thanks
> for any help, I just cant seem to figure this one out on my own.

If you'd actually provided a small example I probably would have an
answer for you immediately, but as it is I can only guess what you're
doing wrong.  In the example above you show the compiler output but you
don't show the command line that produced it.

Provide me with a complete example and I'll show you how to build it.

Andrew.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Setting classpath to include junit
  2009-03-25  9:36 ` Andrew Haley
@ 2009-03-25 14:24   ` Carl
  0 siblings, 0 replies; 3+ messages in thread
From: Carl @ 2009-03-25 14:24 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

> If you'd actually provided a small example I probably would have an
> answer for you immediately, but as it is I can only guess what you're
> doing wrong.  In the example above you show the compiler output but you
> don't show the command line that produced it.
>
> Provide me with a complete example and I'll show you how to build it.
>
> Andrew.
>
>

Thanks for the reply, as it turned out i was using an old version of
junit. Once i installed junit4 from the debian repo and included that
in my classpath instead things started working.

-- 
Carl

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-25 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-24 22:01 Setting classpath to include junit Carl
2009-03-25  9:36 ` Andrew Haley
2009-03-25 14:24   ` Carl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).