AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with compiling files in a folder

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
snehls
Guest





PostPosted: Mon Aug 29, 2005 10:16 am    Post subject: Problem with compiling files in a folder Reply with 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.

Why doesn't he generate class files for the java files, that work fine?

thanks
snehls

Back to top
jAnO!
Guest





PostPosted: Mon Aug 29, 2005 11:03 am    Post subject: Re: Problem with compiling files in a folder Reply with quote




"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





PostPosted: Tue Aug 30, 2005 9:11 am    Post subject: Re: Problem with compiling files in a folder Reply with quote



One could do that, but i think it's quite poor for the compiler.

Back to top
Andrew Thompson
Guest





PostPosted: Tue Aug 30, 2005 9:39 am    Post subject: Re: Problem with compiling files in a folder Reply with quote

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





PostPosted: Fri Sep 02, 2005 11:12 am    Post subject: Re: Problem with compiling files in a folder Reply with quote

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





PostPosted: Fri Sep 02, 2005 12:51 pm    Post subject: Re: Problem with compiling files in a folder Reply with quote

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





PostPosted: Fri Sep 02, 2005 12:54 pm    Post subject: Re: Problem with compiling files in a folder Reply with quote

Quote:
Eclipse supports 'partial compilation'.

And javac definitely doesn't?


Back to top
Oliver Wong
Guest





PostPosted: Fri Sep 02, 2005 5:21 pm    Post subject: Re: Problem with compiling files in a folder Reply with quote

"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





PostPosted: Tue Sep 13, 2005 12:10 pm    Post subject: Re: Problem with compiling files in a folder Reply with quote

Does anyone know how or if one can use eclipse to compile from the
command line ?

Back to top
Oliver Wong
Guest





PostPosted: Tue Sep 13, 2005 2:22 pm    Post subject: Re: Problem with compiling files in a folder Reply with quote


"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





PostPosted: Thu Sep 15, 2005 3:27 am    Post subject: Re: Problem with compiling files in a folder Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.