| View previous topic :: View next topic |
| Author |
Message |
snehls Guest
|
Posted: Mon Aug 29, 2005 10:16 am Post subject: Problem with compiling files in a folder |
|
|
Hi,
i have a folder with several java files in it, if i compile every file
with
javac file1.java
and so on, it works fine for every file except one.
But if i try
javac *.java
, the compiler doesn't generate any class files.
Why doesn't he generate class files for the java files, that work fine?
thanks
snehls
|
|
| Back to top |
|
 |
jAnO! Guest
|
Posted: Mon Aug 29, 2005 11:03 am Post subject: Re: Problem with compiling files in a folder |
|
|
"snehls" <snehls (AT) gmx (DOT) net> wrote
| Quote: | Hi,
i have a folder with several java files in it, if i compile every file
with
javac file1.java
and so on, it works fine for every file except one.
But if i try
javac *.java
, the compiler doesn't generate any class files.
|
Let there be light on your path:
http://ant.apache.org
or
http://maven.apache.org
|
|
| Back to top |
|
 |
snehls Guest
|
Posted: Tue Aug 30, 2005 9:11 am Post subject: Re: Problem with compiling files in a folder |
|
|
One could do that, but i think it's quite poor for the compiler.
|
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Tue Aug 30, 2005 9:39 am Post subject: Re: Problem with compiling files in a folder |
|
|
On 30 Aug 2005 02:11:13 -0700, snehls wrote:
| Quote: | One could do that, but i think it's quite poor for the compiler.
|
I can only guess you misunderstood what Thomas was saying.
But to cut to the chase. I doubt you have compiled your packaged
classes correctly, and one class that requires another class
(possibly in the same package) is the problem.
Could you describe
- your package structure (folders and Java source files) *exactly*,
- then show the exact command you are using to compile the .java files,
- and from where (which directory/folder) did you compile them?
--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"As it is I'm climbing up an endless wall. No time at all."
The Police 'No Time This Time'
|
|
| Back to top |
|
 |
snehls Guest
|
Posted: Fri Sep 02, 2005 11:12 am Post subject: Re: Problem with compiling files in a folder |
|
|
OK here's the whole problem .....
I'm writing a build-tool for a bigger Java Project (about 700 classes),
and the main problem is to compile the sources.
First i wrote a file(ALL_FILES) with the Locations of all java files in
it and compiled with "javac -classpath various.jar -d compiled
@ALL_FILES 2> ERRORS" the compiler tells me several errors (theres a
package missing and some other stuff in several files).
Thats OK so far, but the compiler tells me the erros and doesn't
generate class files for the files that "work". Furthermore its quite
strange that compiling works fine with Eclipse.
So the point is, is there a option for the compiler to make him
generate class files for working parts of a project, despite other
independent parts are erroneous?
|
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Fri Sep 02, 2005 12:51 pm Post subject: Re: Problem with compiling files in a folder |
|
|
On 2 Sep 2005 04:12:42 -0700, snehls wrote:
| Quote: | ..its quite strange that compiling works fine with Eclipse.
|
Eclipse supports 'partial compilation'.
--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Any minute now, I'm expectin' all hell to break loose.."
Bob Dylan 'Things Have Changed'
|
|
| Back to top |
|
 |
snehls Guest
|
Posted: Fri Sep 02, 2005 12:54 pm Post subject: Re: Problem with compiling files in a folder |
|
|
| Quote: | Eclipse supports 'partial compilation'.
|
And javac definitely doesn't?
|
|
| Back to top |
|
 |
Oliver Wong Guest
|
Posted: Fri Sep 02, 2005 5:21 pm Post subject: Re: Problem with compiling files in a folder |
|
|
"snehls" <snehls (AT) gmx (DOT) net> wrote
| Quote: | Eclipse supports 'partial compilation'.
And javac definitely doesn't?
|
I'd be surprised if it does. My theory (though I haven't actually read
the source code of Eclipse to make sure), is that Eclipse actually modifies
source files with errors in them so that they become valid files during the
compilation pass. I believe all that they basically replace the bodies of
broken methods with simply a "throw new UnresolvedCompilationError()"
statement.
- Oliver
|
|
| Back to top |
|
 |
snehls Guest
|
Posted: Tue Sep 13, 2005 12:10 pm Post subject: Re: Problem with compiling files in a folder |
|
|
Does anyone know how or if one can use eclipse to compile from the
command line ?
|
|
| Back to top |
|
 |
Oliver Wong Guest
|
Posted: Tue Sep 13, 2005 2:22 pm Post subject: Re: Problem with compiling files in a folder |
|
|
"snehls" <snehls (AT) gmx (DOT) net> wrote
| Quote: | Does anyone know how or if one can use eclipse to compile from the
command line ?
|
Run->External Tools
But this really seems to be fighting Eclipse rather than using it.
And this is probably not what you meant. I'm guessing you mean "Does
anyone know how or if one can compile using Eclipse, from the command line?"
The answer to which is "I don't know."
- Oliver
|
|
| Back to top |
|
 |
Dale King Guest
|
Posted: Thu Sep 15, 2005 3:27 am Post subject: Re: Problem with compiling files in a folder |
|
|
snehls wrote:
| Quote: | Does anyone know how or if one can use eclipse to compile from the
command line ?
|
Yes, you can. See
<http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-home/howto/batch%20compile/batchCompile.html>
But I am not sure if you get all the benefits of compiling within Eclipse.
--
Dale King
|
|
| Back to top |
|
 |
|