Board index » jbuilder » jar file not always updating

jar file not always updating


2004-10-19 05:58:48 AM
jbuilder18
I am using developer 2005 and have noticed a few times that a jar file I have updated does not always get refreshed in another project where I'm using it.
Project A is a "common" project that contains 3rd party code and common java code that our multiple projects share. this common code gets compiled into a common.jar.
Project B is a project that has common.jar (from project A) as a required library.
If I
1. make a code change to project A (add a new public method)
2. remake the jar file
3. switch projects to project B
4. remake project B
sometimes the new public method is not visible in project B
How can I force project B to refresh so that the new APIs from the common.jar work?
 
 

Re:jar file not always updating

andrew dingfelder wrote:
Quote
I am using developer 2005 and have noticed a few times that a jar
file I have updated does not always get refreshed in another project
where I'm using it.

Project A is a "common" project that contains 3rd party code and
common java code that our multiple projects share. this common code
gets compiled into a common.jar.

Project B is a project that has common.jar (from project A) as a
required library.

If I 1. make a code change to project A (add a new public method) 2.
remake the jar file 3. switch projects to project B 4. remake
project B

sometimes the new public method is not visible in project B

How can I force project B to refresh so that the new APIs from the
common.jar work?
You can't do that in JBuilder. You never could. The jar files end up
"cached" in a VFS (virtual file system). But they did eventually listen
to all our loud, angry compliants and give us a different way to do this.
If you have the dependencies listed above, then you should remove the
common.jar file required library from your project B. Then add the
project A as a required library for project B. That should work the way
you wanted it.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

Re:jar file not always updating

I tried to do this and still have times it doesnt refresh. Here is how I did it:
I went to the configure libraries menu item
I chose "new" then "add" then navigated to the root of my common project.
I then went to the project properties menu item and then to the required libraries tab.
In this tab, I removed the old common jar I used before, then I picked the library from the previous step.
Now If I co and make a code change in the common project and regenerate the jar file, then switch projects, the sometimes show up and sometimes dont.
arggg :(
"Lori M Olson [TeamB]" < XXXX@XXXXX.COM >wrote:
Quote
andrew dingfelder wrote:

>I am using developer 2005 and have noticed a few times that a jar
>file I have updated does not always get refreshed in another project
>where I'm using it.
>
>Project A is a "common" project that contains 3rd party code and
>common java code that our multiple projects share. this common code
>gets compiled into a common.jar.
>
>Project B is a project that has common.jar (from project A) as a
>required library.
>
>If I 1. make a code change to project A (add a new public method) 2.
>remake the jar file 3. switch projects to project B 4. remake
>project B
>
>sometimes the new public method is not visible in project B
>
>How can I force project B to refresh so that the new APIs from the
>common.jar work?

You can't do that in JBuilder. You never could. The jar files end up
"cached" in a VFS (virtual file system). But they did eventually listen
to all our loud, angry compliants and give us a different way to do this.

If you have the dependencies listed above, then you should remove the
common.jar file required library from your project B. Then add the
project A as a required library for project B. That should work the way
you wanted it.

--

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html

 

{smallsort}

Re:jar file not always updating

is nobody else seeing this issue?
or does nobody have a "common" library for their development team?
Note: this happens to me with both 2005 developer and X foundation.
 

Re:jar file not always updating

I had such problems before and I just stopped using generated jar files
in JBuilder build (command line build still generates them). I just
created libraries that point to other projects output classes
directories. It works well, but sometimes XXXInsight does not see
classes from dependencies (I guess it happens when I do a command line
rebuild while JBuilder is running - command line build outputs classes
into the same folders as JBuilder).
- Alexey.
andy dingfelder wrote:
Quote
is nobody else seeing this issue?

or does nobody have a "common" library for their development team?

Note: this happens to me with both 2005 developer and X foundation.
 

Re:jar file not always updating

This is crazy. I have spent about a week ripping my hair out with this bug.
When will this be fixed in JBuilder?
I have tried adding the jar file
I have tried adding the project itself
I have tried adding the classes directory
All intermittently update but none do it consistantly.
I can reproduce this on 3 seperate machines, using both JBuilder 2005 and JBuilderX.
This is not a "nice to have", it is a "Manditory Must Have" for anyone doing real development (i.e. multiple developers and muiltiple projects which use shared code).
Are there any open support tickets on this issue that I should be aware of?
Thanks,
Andy Dingfelder
"Alexey N. Solofnenko" < XXXX@XXXXX.COM >wrote:
Quote
I had such problems before and I just stopped using generated jar files
in JBuilder build (command line build still generates them). I just
created libraries that point to other projects output classes
directories. It works well, but sometimes XXXInsight does not see
classes from dependencies (I guess it happens when I do a command line
rebuild while JBuilder is running - command line build outputs classes
into the same folders as JBuilder).

- Alexey.

andy dingfelder wrote:
>is nobody else seeing this issue?
>
>or does nobody have a "common" library for their development team?
>
>Note: this happens to me with both 2005 developer and X foundation.
 

Re:jar file not always updating

andy dingfelder wrote:
Quote
is nobody else seeing this issue?

or does nobody have a "common" library for their development team?

Note: this happens to me with both 2005 developer and X foundation.
We have projects with a "common" library (actually, libraries) and we
have no problem with this but...
I've set up our projects so that jars are built with Ant rather than
JBuilder's archive builder. My work flow goes something like this:
1. Make changes to project A
2. Compile project A with JBuilder
3. Create common jar with Ant from within JBuilder - Note that Ant could
also compile the code but then JBuilder wouldn't pick up all the
dependencies
4. Compile project B to pick up any changes to the jar - This step is
only necessary if any interfaces changed in common otherwise, skip
5. Make changes to project B
6. Compile project B
7. Create jar B with Ant from within JBuilder
8. Test
9. Go back to step 1 or 5, as necessary
When it comes time for a production build, Ant is used to compile all
projects and build all the required jars.
I think that this works because the jars are not part of the JBuilder
projects and so are not cached in the VFS that Lori mentioned. Since
the jars are not cached, they are examined on every build and changes
get picked up. Note, however, that changes will not be picked up until
the dependant project is built.
Hope this helps,
Dan.
 

Re:jar file not always updating

I am in the same boat as you and I managed to survive. To fix your
situation please remove any jars that can be regenerated from project
classpath. Replace them with directories or with other project
references (if your JBuilder supports it). Restart JBuilder. Live
happily ever after ;-). Or not very happily, but this would be your
choice...
- Alexey.
 

Re:jar file not always updating

actually, I spent a lot of money buying this as a commerical product.
I seriously expect Borland to fix this.
What is my next step Borland?
"Alexey N. Solofnenko" < XXXX@XXXXX.COM >wrote:
Quote
I am in the same boat as you and I managed to survive. To fix your
situation please remove any jars that can be regenerated from project
classpath. Replace them with directories or with other project
references (if your JBuilder supports it). Restart JBuilder. Live
happily ever after ;-). Or not very happily, but this would be your
choice...

- Alexey.

 

Re:jar file not always updating

Could you possible pin this down a little more than "sometimes". As far
as I can tell I've been doing the exact same thing as you and have never
seen this problem.
Mike
"andrew dingfelder" < XXXX@XXXXX.COM >wrote in message
Quote

I am using developer 2005 and have noticed a few times that a jar file I
have updated does not always get refreshed in another project where I'm
using it.
Quote

Project A is a "common" project that contains 3rd party code and common
java code that our multiple projects share. this common code gets compiled
into a common.jar.
Quote

Project B is a project that has common.jar (from project A) as a required
library.

If I
1. make a code change to project A (add a new public method)
2. remake the jar file
3. switch projects to project B
4. remake project B

sometimes the new public method is not visible in project B

How can I force project B to refresh so that the new APIs from the
common.jar work?
 

Re:jar file not always updating

Call Borland support. It is not free, but if the problem is JBuilder bug
[I heard] they will not charge you.
- Alexey.
andy dingfelder wrote:
Quote
What is my next step Borland?
 

Re:jar file not always updating

I actually have a year of support paid for.
I was hoping that I could find a quick answer here since it is such a blantly obvious "must have".
I will let you guys know what the response is.
Andy
"Alexey N. Solofnenko" < XXXX@XXXXX.COM >wrote:
Quote
Call Borland support. It is not free, but if the problem is JBuilder bug
[I heard] they will not charge you.

- Alexey.

andy dingfelder wrote:
>What is my next step Borland?
 

Re:jar file not always updating

Mike,
Thats part of the problem, It seems that JBuilder caches the data and updates it when it chooses to.
I dont think it has an relationship to *what* i change in the common jar.
I have opened an official support ticket on this issue so I will keep you posted on the progress.
Andy
"John Public" <name.##@osu.edu>wrote:
Quote

Could you possible pin this down a little more than "sometimes". As far
as I can tell I've been doing the exact same thing as you and have never
seen this problem.

Mike
 

Re:jar file not always updating

On 11/3/2004 at 1:50:03 PM, andy dingfelder wrote:
Quote
actually, I spent a lot of money buying this as a commerical product.

I seriously expect Borland to fix this.
JBuilder needs to access the jar files on the project's class path in
order to provide features such as on-the-fly parsing and for CodeInsight.
It is not surprising that the files are kept open. And it is not
surprising that when you overwrite a file that an application has open,
things might get a little messed up.
JBuilder does not support overwriting open JAR files and it has never has
supported doing this. It does support overwriting class files, since it
does not maintain those files open. So you can achieve the same effect by
unpacking the JAR file into a directory and pointing your library at that.
Or if you are creating the library from another JBuilder project, just add
that project to yours under "Required Libraries".
Quote
What is my next step Borland?
You are not the first person to want this feature. If you vote for the
enhancement on QualityCentral, you can let Borland know that this is
important for you:
qc.borland.com/wc/wc.exe/details
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
www.JPMcGrath.net/newsgroups/e-mail.html