File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes why is 'bin' in my package path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "why is Watch "why is New topic

why is 'bin' in my package path

Chris Montgomery
Ranch Hand

Joined: Jan 14, 2004
Posts: 141
I just did a simple jar build with ant and found when I import that jar to a separate project and all of the packages in my jar begin with vs.

I'm using eclipse and have all of my compled code in the bin directory (which explains why bin is there).

Do I need to rename my bin directory to com, or is there a way to work with ant such that my compiled code can continue to live in bin/com/my/project, yet the packages don't begin with bin?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Sounds more like an issue with your eclipse setup than with ant, so I've moved this to the IDEs forum.

[Asking smart questions] [About Bear] [Books by Bear]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33106

Right click the project in Eclispe to view the properties. At the bottom of the build section, it allows you to say what folder the compiled code is in. Set this to bin and it will stop showing up separately in your package path.
Chris Montgomery
Ranch Hand

Joined: Jan 14, 2004
Posts: 141
Thanks for moving this to the correct spot!

I'm currently looking at my project properties and see that my Default Output Folder is set to myProject/bin.

So I think I have this set correctly
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
If I understand correctly, it's not the Eclipse project setting that are at fault, but your Ant script that builds the jar. It simply uses the wrong base folder. Can you show us the target you use for building the jar?

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Chris Montgomery
Ranch Hand

Joined: Jan 14, 2004
Posts: 141
You are correct. I simply used a different ant example and the issue went away.

I tried providing my xml code, but it's not showing up properly in the browser.

[ August 29, 2005: Message edited by: Chris Montgomery ]
I agree. Here's the link:
subject: why is 'bin' in my package path
jQuery in Action, 3rd edition