aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse does not compile class automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse does not compile class automatically" Watch "Eclipse does not compile class automatically" New topic
Author

Eclipse does not compile class automatically

Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Hi All,

Actually I am new to Eclipse Galileo IDE and creating basic Struts 2 application in this.
In this IDE Windows --> Preference --> General --> Workspace --> Build Automatically option is selected.

But when you run an application on server i believe you action class should be automatically compiled and converted to .class file.

But the same is not happening with the IDE which i have?

Could any please let me know where to check?

Thanks in Advance.
Jay.

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Is the folder/package containing the action class one of the source paths in the Java build settings?
Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Hi David,

Thanks for your reply and i undestood what you are asking.
But i have confusion to add folder.

I have User.java which is under below folder.

D:\Eclipse_wrksp\Struts2Application\WebContent\WEB-INF\src\com\kogent

and remaining java files are in

D:\Eclipse_wrksp\Struts2Application\WebContent\WEB-INF\src\com\kogent\action

folder.

So which to be included

\Struts2Application\WebContent\WEB-INF\src\com\kogent

OR

\Struts2Application\WebContent\WEB-INF\src\com\kogent\action

Thanks.

Jay Shukla.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Neither; the root of the source directory is "blah/src".
Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Ok David.

Means Source Path to be set as follows:

/Struts2Application/WebContent/WEB-INF/src

and default output folder would be

/Struts2Application/WebContent/WEB-INF/classes


Is it right?

Thanks.
Jay Shukla.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Sure, you could do that (although personally, I wouldn't put the source code in the same place as the output--too risky).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse does not compile class automatically