Bug 335041 - Build project option - deleting all the .class files. But i don't want to clean
Summary: Build project option - deleting all the .class files. But i don't want to clean
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2011-01-21 13:31 EST by Raj CLA
Modified: 2022-08-27 12:09 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raj CLA 2011-01-21 13:31:42 EST
Build Identifier: 

I am working in BEA web logic 9.2 with workshop.
Working in JAVA. My project is very very big project. If I start the build, it will take 4 hours to create jar files.
So I am using the exploded deployment. So that, if i change a file, i can generate a .class file for that and copy that .class file for the exploded deployment.

How I am generating .class file ?

               I right click the project to select the build project  option.
Issue:
                  But it is cleaning all the .class files (With the message "cleaning output folder")and generating all the .class files from the beginning. So generating all the .class files are taking too much of time. I need help to create the .class file for the particular java file which i have changed recently .
It should not delete the old generated .class files. It should have to generate the .class for the java files which i have changed recently(1 or 2 files)

Reproducible: Always
Comment 1 Ayushman Jain CLA 2011-01-24 01:26:38 EST
(In reply to comment #0)
> Build Identifier: 
> 
> I am working in BEA web logic 9.2 with workshop.
> Working in JAVA. My project is very very big project. If I start the build, it
> will take 4 hours to create jar files.
> So I am using the exploded deployment. So that, if i change a file, i can
> generate a .class file for that and copy that .class file for the exploded
> deployment.
> 
> How I am generating .class file ?

I dont understand why you have to manually create a .class file. Eclipse compiles the code and builds one for you as soon as you save the .java file. So whenever you create a new file, or modify a couple of existing files, only the .class files corresponding to them get generated (unless ofcourse there are dependencies). So you dont even have to use clean option anyway.

Can you please elaborate your problem a bit more?
Comment 2 Olivier Thomann CLA 2011-01-24 11:26:28 EST
The incremental builder is supposed to recompile only what has changed and its dependencies to ensure consistency through all .class files.
If you have an example that clearly doesn't work, it should be reported as is. 

Could you please also specify the version of jdt.core that comes with BEA web logic 9.2 with workshop?

Thanks
Comment 3 Olivier Thomann CLA 2011-02-01 09:59:07 EST
Please answer the questions asked in comment 1 and comment 2.
Comment 4 Raj CLA 2011-02-01 12:39:00 EST
(In reply to comment #1)
> (In reply to comment #0)
> > Build Identifier: 
> > 
> > I am working in BEA web logic 9.2 with workshop.
> > Working in JAVA. My project is very very big project. If I start the build, it
> > will take 4 hours to create jar files.
> > So I am using the exploded deployment. So that, if i change a file, i can
> > generate a .class file for that and copy that .class file for the exploded
> > deployment.
> > 
> > How I am generating .class file ?
> 
> I dont understand why you have to manually create a .class file. Eclipse
> compiles the code and builds one for you as soon as you save the .java file. So
> whenever you create a new file, or modify a couple of existing files, only the
> .class files corresponding to them get generated (unless ofcourse there are
> dependencies). So you dont even have to use clean option anyway.
> 
> Can you please elaborate your problem a bit more?

Hi,
thanks for your support:). My project will take more than 4 hours to complete the build. In my project the .class files are not the auto generated one. So usually i am using the "exploded deployment" to copy the .class files to the jar. So i am selecting the project and right click - > build projet option to generate the .class files. when i open the workspace, 1st time, it's cleaning all the .class files and generating the new .class files. from next time onwards, if i change a java file, it's genearating a .class file for that.(same as, selcting the project -> right cliack-> build project option). it's not cleaning all the .class files.it's working fine till i close the workshop.
           The issue is, when i close and open the workshop, when i try to genearate the .class file for a java file(selecting the project and right click - > build projet option), it's deleting all the .class files and generating the new one. 
               So i want to know, how can i stop cleaning all the .class files whenever i close and open  the workshop and trying the selecting the project and right click - > build projet option.
Comment 5 Olivier Thomann CLA 2011-02-24 10:37:27 EST
It would be good if you could run in debug mode so that we can understand why the builder doesn't trust the current build state.
Create a .option file where you have your eclipse executable and put these lines in it:
org.eclipse.jdt.core/debug=true
org.eclipse.jdt.core/debug/builder=true
org.eclipse.jdt.core/debug/builder/stats=true
org.eclipse.jdt.core/debug/compiler=true

Then on the next full build, please provide the log to us so that we can analyze what could be wrong.
Comment 6 Olivier Thomann CLA 2011-08-24 14:58:49 EDT
Without further information, this will be close as WORKSFORME.
Comment 7 Eclipse Genie CLA 2020-08-26 01:26:29 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Eclipse Genie CLA 2022-08-27 12:09:25 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.