Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Compile One Java File- That's it!
Compile One Java File- That's it! [message #62060] Thu, 19 June 2003 15:05 Go to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

Hi,
Can I compile one Java File in the project where there are probably 500
more in the project included.
I don't want it to Build the Entire Project.

Thanks...
Re: Compile One Java File- That's it! [message #62107 is a reply to message #62060] Thu, 19 June 2003 15:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: burner.zclipse.org

On Thu, 19 Jun 2003 19:05:37 +0000, vns wrote:

> Hi,
> Can I compile one Java File in the project where there are probably 500
> more in the project included.
> I don't want it to Build the Entire Project.

Just "Ctrl-S" to save it.

Eclipse has a powerful incremental compiler which handles this for you.

>
> Thanks...
Re: Compile One Java File- That's it! [message #62201 is a reply to message #62107] Thu, 19 June 2003 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

Michael R Head wrote:

> On Thu, 19 Jun 2003 19:05:37 +0000, vns wrote:

> > Hi,
> > Can I compile one Java File in the project where there are probably 500
> > more in the project included.
> > I don't want it to Build the Entire Project.

> Just "Ctrl-S" to save it.

> Eclipse has a powerful incremental compiler which handles this for you.

> >
> > Thanks...

I want to see the .class file being created. I didn't see just doing
Ctrl-S.
there should be something specifically for this. I want this to happen,
without changing any line of code.

Thanks...
Re: Compile One Java File- That's it! [message #62296 is a reply to message #62201] Thu, 19 June 2003 18:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

Make sure you have Window->Preferences->WorkBench and on that page have
the checkbox on "Perform build automatically on resource modification"

If you don't have that set it won't incrementally compile.

Rich
Re: Compile One Java File- That's it! [message #62320 is a reply to message #62296] Thu, 19 June 2003 18:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

Richard L. Kulp wrote:

> Make sure you have Window->Preferences->WorkBench and on that page have
> the checkbox on "Perform build automatically on resource modification"

> If you don't have that set it won't incrementally compile.

> Rich

Can I do that without that? I don't want to modify source, but still
compile that one file.


Thanks...
Re: Compile One Java File- That's it! [message #62367 is a reply to message #62320] Thu, 19 June 2003 18:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

With the incremental compiler turned on you will ALWAYS have a compiled
file. There is no need to request a single one to be built. Everytime a
change is made to the file it will automatically rebuild it AND (which
is neat) any other class that depends on that class will also get
recompiled.

Rich
Re: Compile One Java File- That's it! [message #62442 is a reply to message #62320] Thu, 19 June 2003 19:13 Go to previous messageGo to next message
Eclipse UserFriend
The short answer is no you can not.

martin
Re: Compile One Java File- That's it! [message #62792 is a reply to message #62320] Fri, 20 June 2003 09:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Olivier_Thomann.ca.ibm.comNOSPAM

On Thu, 19 Jun 2003 22:08:37 +0000 (UTC), vnssoftware@myway.com (vns)
wrote:
>Can I do that without that? I don't want to modify source, but still
>compile that one file.
If you use autobuild, then there is no need for that. Your source is
always in synch with your binaries except if you manually remove the
generated .class files.
--
Olivier
Re: Compile One Java File- That's it! [message #62809 is a reply to message #62367] Fri, 20 June 2003 09:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

Richard L. Kulp wrote:

> With the incremental compiler turned on you will ALWAYS have a compiled
> file. There is no need to request a single one to be built. Everytime a
> change is made to the file it will automatically rebuild it AND (which
> is neat) any other class that depends on that class will also get
> recompiled.

> Rich
The problem is this-
I just want to have one project for everything.
I would like to keep the 500 other Java files in the Project for Reference
since I don't want to go to and get them every time. I however will want
to compile probably only one or two files out of that. Let the dependent
files compile but I don't want the whole tree to be compiled. Once done, I
can delete those class files. That's why I wanted this. However, it seems
I have to create seperate projects each time. I don't want to do that. I
am more comfortable with one project. So I just wanted that this one file
compilation feature.....

Thanks...
Re: Compile One Java File- NOT AVAILABLE [message #63680 is a reply to message #62809] Fri, 20 June 2003 17:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

Should I conclude that Eclipse will not be able to do one file compilation
allowing it to compile any depends files, but not the entire project.


Thanks...
Re: Compile One Java File- NOT AVAILABLE [message #63703 is a reply to message #63680] Fri, 20 June 2003 19:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

Why bother? What is wrong with having the other files always compiled
and ready. It doesn't hurt anything. That way you don't need to worry
about compiling just one file. It will be compiled when necessary, no
need for you to even think about it. One less thing to worry about.
Re: Compile One Java File- NOT AVAILABLE [message #63911 is a reply to message #63703] Sat, 21 June 2003 09:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

Richard L. Kulp wrote:

> Why bother? What is wrong with having the other files always compiled
> and ready. It doesn't hurt anything. That way you don't need to worry
> about compiling just one file. It will be compiled when necessary, no
> need for you to even think about it. One less thing to worry about.


Just makes it slower when you have 5000 Java files already compiled in jar
and you are including the source files in the project. Its already
compiled in jar. Do you think its still compiling the whole 5000 file? If
yes, is it worth every time I open project and it goes through this
process specially when jars already have the compilation done. This is
what irritates- time.
Re: Compile One Java File- NOT AVAILABLE [message #63934 is a reply to message #63911] Sat, 21 June 2003 10:53 Go to previous messageGo to next message
Eclipse UserFriend
>> Why bother? What is wrong with having the other files always compiled
>> and ready. It doesn't hurt anything. That way you don't need to worry
>> about compiling just one file. It will be compiled when necessary, no
>> need for you to even think about it. One less thing to worry about.
>
>Just makes it slower when you have 5000 Java files already compiled in jar
>and you are including the source files in the project. Its already
>compiled in jar. Do you think its still compiling the whole 5000 file? If
>yes, is it worth every time I open project and it goes through this
>process specially when jars already have the compilation done. This is
>what irritates- time.

I am getting curios. You have already an jar with all the binaries
(classes). Why not just add that to your project and add the sources
to that jar?
Some posts ago it were just 500 files, 5000 could be quite a lot for
one project. 500 is no problem at all.

martin
Re: Compile One Java File- NOT AVAILABLE [message #64189 is a reply to message #63934] Sat, 21 June 2003 21:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

Martin Möbius wrote:


> I am getting curios. You have already an jar with all the binaries
> (classes). Why not just add that to your project and add the sources
> to that jar?
> Some posts ago it were just 500 files, 5000 could be quite a lot for
> one project. 500 is no problem at all.

> martin

Its 5000 in another project. Tell me one thing- If sources are attached in
the jars, can I see in Package Explorer the Java files in the sources jar
without seperately adding Java Files. That is-
Suppose Class Jar is myjar.jar
Source Jar is myjarsource.jar
In this there is one Java file: com.mycompany.MyCompany.java
I want to see this directly from myjarsource.jar
I want to modify this file. I want that this modified file comes in
classpath before the compiled class in the myjar.jar
If this is not possible, then compiling all those classes (our normal
build take more than 2 hrs) by automiatic compilation is problem :-( (Why
not just at least give this flexibilty gto those who want. Can external
tools usage help)
Thanks...
Re: Compile One Java File- STILL HOPING [message #64450 is a reply to message #64189] Sun, 22 June 2003 10:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

> Its 5000 in another project. Tell me one thing- If sources are attached in
> the jars, can I see in Package Explorer the Java files in the sources jar
> without seperately adding Java Files. That is-
> Suppose Class Jar is myjar.jar
> Source Jar is myjarsource.jar
> In this there is one Java file: com.mycompany.MyCompany.java
> I want to see this directly from myjarsource.jar
> I want to modify this file. I want that this modified file comes in
> classpath before the compiled class in the myjar.jar
> If this is not possible, then compiling all those classes (our normal
> build take more than 2 hrs) by automiatic compilation is problem :-( (Why
> not just at least give this flexibilty gto those who want. Can external
> tools usage help)
> Thanks...


Is there hope from me from above scenerio?
Re: Compile One Java File- STILL HOPING [message #64496 is a reply to message #64450] Sun, 22 June 2003 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnssoftware.myway.com

hvns wrote:



> > Its 5000 in another project. Tell me one thing- If sources are attached in
> > the jars, can I see in Package Explorer the Java files in the sources jar
> > without seperately adding Java Files. That is-
> > Suppose Class Jar is myjar.jar
> > Source Jar is myjarsource.jar
> > In this there is one Java file: com.mycompany.MyCompany.java
> > I want to see this directly from myjarsource.jar
> > I want to modify this file. I want that this modified file comes in
> > classpath before the compiled class in the myjar.jar
> > If this is not possible, then compiling all those classes (our normal
> > build take more than 2 hrs) by automiatic compilation is problem :-( (Why
> > not just at least give this flexibilty gto those who want. Can external
> > tools usage help)
> > Thanks...


> Is there hope from me from above scenerio?

Can I use javac as External tool to compile one file and keep automatic
build offline. I guess that should solve.
Re: Compile One Java File- STILL HOPING [message #64564 is a reply to message #64496] Sun, 22 June 2003 11:06 Go to previous message
Eclipse UserFriend
>> > Its 5000 in another project. Tell me one thing- If sources are attached in
>> > the jars, can I see in Package Explorer the Java files in the sources jar
>> > without seperately adding Java Files. That is-
>> > Suppose Class Jar is myjar.jar
>> > Source Jar is myjarsource.jar
>> > In this there is one Java file: com.mycompany.MyCompany.java
>> > I want to see this directly from myjarsource.jar
>> > I want to modify this file. I want that this modified file comes in
>> > classpath before the compiled class in the myjar.jar
>> > If this is not possible, then compiling all those classes (our normal
>> > build take more than 2 hrs) by automiatic compilation is problem :-( (Why
>> > not just at least give this flexibilty gto those who want. Can external
>> > tools usage help)
>> > Thanks...
>
>
>> Is there hope from me from above scenerio?
>
>Can I use javac as External tool to compile one file and keep automatic
>build offline. I guess that should solve.

I never tried. There are options to turn autobuild off and scrubbing
of the outputfolder. So I would guess it could work.

Is there no version system where just get the changed files?
Its of course cruel that eclipse recompile 5000 classes when they are
already compiled.

martin
Previous Topic:pls tell me the steps to create,deploy, run my first j2ee by lomboz
Next Topic:eclipse profiler plugin 5.25
Goto Forum:
  


Current Time: Tue May 13 07:31:30 EDT 2025

Powered by FUDForum. Page generated in 0.07431 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top