How to display source code without compiling it

I have just downloaded an open source project (Quartz) from source forge,
including a jar containing class files and a jar containing source code
among other things.

The source code will not compile on my machine, unless I download lots of
other stuff (struts, jboss, etc) which I do not want to do.

I have set up a project, and I put the class jar file in my classpath, and
everything works fine.
Except - I am not able to look into the Quartz source code or see the
Quartz javadoc.

If I add the source code to my source path, intelliJ tries to compile it,
and cannot.

I was hoping that if I move the source code out of my project path that
would work, but no dice.
So is there any way to have your source and not compile it?

Thanks/Victor
PS Please reply to my email as well - vgrazi@caxton.com


6 comments
Comment actions Permalink

Add the jar inisde a project library. You then have also the option of
specifying the source code of the library.


0
Comment actions Permalink

That doesn't seem to do it.
I have created a library. When I point the library to the jar file, nothing
shows up.
If I point the library to the expanded jar file, IntelliJ again tries to
compile the source, and the compiler chokes because no Struts or JBoss.

"Carlos Costa e Silva" <carlos@keysoft.pt> wrote in message
news:behu2h$ih0$1@is.intellij.net...

Add the jar inisde a project library. You then have also the option of
specifying the source code of the library.

>
>


0
Comment actions Permalink

I have all my libs like this (some with sources in jars, others with sources
"on disk"), both in Ariadna and Aurora and it works.

I have created a library. When I point the library to the jar file,

nothing

shows up.


Example Aurora libs in lib.gif

"> If I point the library to the expanded jar file, IntelliJ again tries to

compile the source, and the compiler chokes because no Struts or JBoss.


Ensure the lib sources aren't "inside" a sourcepath entry. Everything inside
sourcepath entries is compiled.





Attachment(s):
lib.gif
0
Comment actions Permalink

Yes, this works. The problem was that the library was under my source path.
However now, I am not able to open classes in the library using ctrl-N.

Not a major deal, but it would be convenient. Any way to do this?

"Carlos Costa e Silva" <carlos@keysoft.pt> wrote in message
news:bei970$1mv$1@is.intellij.net...

I have all my libs like this (some with sources in jars, others with

sources

"on disk"), both in Ariadna and Aurora and it works.

>

I have created a library. When I point the library to the jar file,

nothing

shows up.

>

Example Aurora libs in lib.gif

>

"> If I point the library to the expanded jar file, IntelliJ again tries

to

compile the source, and the compiler chokes because no Struts or JBoss.

>

Ensure the lib sources aren't "inside" a sourcepath entry. Everything

inside

sourcepath entries is compiled.

>
>
>


0
Comment actions Permalink

1. Known bug in aurora: you have to add your output path to the excluded
list (in Proj. Properties->Main module).

2. Aurora 859 (and earlier?), has a bug in that on some unknown (to us)
circunstancies control-n, find usages, etc open the lib class file even if
the source file is available.


0
Comment actions Permalink

Hi,
I don't know which IDEA version you are using but since build 859 (or maybe
the version before), it is possible to add a .jar-file to the library and
attach the source code to that library - this should solve your problems.

Otherwise, look at using ANT for building...

Best,
Runar Svendsen



"Victor Grazi" <victor.grazi@verizon.net> wrote in message
news:behmjs$tvu$1@is.intellij.net...

I have just downloaded an open source project (Quartz) from source forge,
including a jar containing class files and a jar containing source code
among other things.

>

The source code will not compile on my machine, unless I download lots of
other stuff (struts, jboss, etc) which I do not want to do.

>

I have set up a project, and I put the class jar file in my classpath, and
everything works fine.
Except - I am not able to look into the Quartz source code or see the
Quartz javadoc.

>

If I add the source code to my source path, intelliJ tries to compile it,
and cannot.

>

I was hoping that if I move the source code out of my project path that
would work, but no dice.
So is there any way to have your source and not compile it?

>

Thanks/Victor
PS Please reply to my email as well - vgrazi@caxton.com

>
>


0

Please sign in to leave a comment.