you sure that the rt.jar reference in your build path is valid? The error
you mentioned originally means that the classloader doesn't have access to a
class that is in that jar. As far as using your system classpath
(%classpath%), I wouldn't recommend doing it as you will sacrifice portability
to another machine since other machines won't have the same system classpath
(and when you start putting all jars in your system classpath you end up over
time with a huge classpath that becomes very difficult to debug when you do
get classNotFoundExceptions). I try to create my classpaths either in a
batch file or in my ant build script. As far as the . that you are adding
when using command line, I believe
that is done automatically by eclipse when you specify a build directory for the project.
in your properties for the project again, and get the absolute path to rt.jar
from the build path (should be %JAVA_HOME%\jre\lib\rt.jar). Then open that
file using winzip and go to the object class in
the java.lang package. If it's there, then something is really
wrong because eclipse should certainly be able to find it. If you really
want to add your system classpath to the project, you can use the build-path in Eclipse and click on the add variable
button. Hope this helps.
I tried all solutions you all suggest but it
still cannot work.
I also have the same problem when compiling at
"Exception in thread "main"
Then, I type set classpath
(add "."). It works.
But I don't know how to do something like that
on Eclipse. I even set classpath environment variable for my Windows with the
"." but it doesn't
Any other suggestions ?
----- Original Message -----
Sent: Thursday, January 23, 2003 10:10
Subject: Re: [aspectj-users] ask for
compiling examples - sorry if duplicated
I had similar problems just 2 weeks ago.
There may be two
things to check or to do:
1. check if your java-classpath is
2. your AspectJ-project needs absolute paths (NOT relative
paths) in the
Hope that may help,
> Thanks. I can open the example package now. However, I
> problem. I use Eclipse 2.0.2 with aspectj 1.0.6. I
create a new aspectj
> project and add 2 files in the introduction
package (Point.java and
> ComparablePoint.java) to test my first
aspectj project. I already added
> the aspectjrt.jar to the lib and
made configurations as instructed.
> Unfortunately, it cannot run.
This is the compiler error:
> Error occurred during initialization of VM
> For the reason that I am completely new to aspectj and eclipse,
> really difficult for me to find out the problem. Anybody has
> this problem, please help me.
> ----- Original Message
> *From:* hilsdale@xxxxxxxx <mailto:hilsdale@xxxxxxxx>
*To:* aspectj-users@xxxxxxxxxxx <mailto:aspectj-users@xxxxxxxxxxx>
*Sent:* Thursday, January 23, 2003 5:50 PM
*Subject:* RE: [aspectj-users] ask for compiling examples - sorry
> Two things:
> 1) If you're using AspectJ 1.1beta to do
your exploration, don't
> worry about the
example and docs package, since all the examples
> docs are included in the one
> 2) If you're using
AspectJ 1.0.6, then I've found that winzip
(http://winzip.com) handles .tar.gz files
> From: Ha Nguyen
Wednesday, 22 January, 2003 6:21 pm
> To: aspectj-users@xxxxxxxxxxx <mailto:aspectj-users@xxxxxxxxxxx>
Subject: [aspectj-users] ask for compiling examples - sorry
> I am beginning to learn how to work with
AspectJ. I want to try to
> compile some
examples as described in the online Documentation but
> cannot open the example and doc package
(the tar file). Does it work
> on WindowsXP or
do I have to work with it on a Unix-base system
> Please help me out. Thank you.
aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx <mailto:aspectj-users@xxxxxxxxxxx>
Don't let your fears stand in the way of your
Silvia Breu breu@xxxxxxxxxxxxxxxxx