aspose file tools
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse: Can't add new package Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply Bookmark "Eclipse: Can Watch "Eclipse: Can New topic
Author

Eclipse: Can't add new package

Carl Zeigler
Greenhorn

Joined: Mar 09, 2010
Posts: 5
Hello and thank you in advance.

I am having a problem adding a new class and package (not default) to a dynamic web project in Eclipse. When I add the package, it is displayed under Java Resources: src as an expanded folder (not a package) in the package explorer window and the .java file is not compiled to a .class file when saved. I have "Build Automatically" checked in the project settings and the java build path settings for the source output folder look OK.

By comparison, using another test project (dynamic web) that I created, the new package is added to the project under Java Resources: src as a package (not a folder) and works just fine. The .java file is compiled to the build\classes directory and I am able to use the class in a JSP.

I am not able to determine what the difference is between the two projects that might be causing this issue.

Any suggestions are greatly appreciated.

Thanks,
Carl


Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5543

Carl, welcome to Java Ranch!

It looks like the src folder is not defined as a source folder. Right click on src and select Build Path | Use as Source Folder.


JBoss In Action
Carl Zeigler
Greenhorn

Joined: Mar 09, 2010
Posts: 5
Thank you, thank you, thank you! I had to first remove src from the build path then I was able to select -> build path | use as source folder. Worked like a charm.

Carl
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse: Can't add new package
 
Similar Threads
Servlet Problems
Fighting the org.apache.jasper.JasperException: Module 'null' not found error
org.apache.jasper.JasperException: Unable to compile class for JSP:
FileNotFoundException -- Spring Context.xml
jboss not able to read .war file