|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Compiles and Runs Without New Program Behavior ExhibitedI downloaded source for the BuddySpace jabber client. I brought it
into NetBeans 5.5 with "import a Java application that was created in a different environment." According to Keegan et al Field Guide 2 Ed. page 71 Figure 4-1 I had obtained a CVS working directory. After getting jars in the right place the thing actually compiled and ran and was a working client. Then I started to make tiny changes in the code, like adding a System.out.println in BSMainFrame.java. Long story short, no changes I programmed resulted in any change in program behavior, either by run in NetBeans, or run with debug in NetBeans, or from command line. That is, what I said to print did not print when I fully expected it to print. There are System.out.println's in the source code that work, but mine don't work, nor do my changes in their's work. So, I figured this must be something I don't understand about CVS. Thus, I started all over with a fresh copy (hundreds of source files) in a separate directory except I systematically deleted every CVS-related subfolder, and imported the entire modified source tree over again. Now there is no evidence whatsoever that CVS is in the story. NEVERTHELESS, the exact same phenomena recur. I even systematically commented out (with // ) every System.out.println in BSMainFrame.java, and yet the printouts still appear, either inside the NetBeans output window, or in a command line window. Be reminded, the compiled code runs perfectly well as a jabber client. Ultimately, I intend to add very interesting functionality to this open source code. I am completely mystified so your advice will be most helpful, thank you. |
|
|
Re: Compiles and Runs Without New Program Behavior ExhibitedHave you done a "Clean and Build Main Project"? I have found that ant
doesn't always detect changes between projects and sometimes my changes are only picked up if I cleane everything first. dcm On 6/22/07, Ellis D. Cooper <xtalv1@...> wrote: > I downloaded source for the BuddySpace jabber client. I brought it > into NetBeans 5.5 with "import a Java application that was created in > a different environment." According to Keegan et al Field Guide 2 Ed. > page 71 Figure 4-1 I had obtained a CVS working directory. After > getting jars in the right place the thing actually compiled and ran > and was a working client. Then I started to make tiny changes in the > code, like adding a System.out.println in BSMainFrame.java. Long > story short, no changes I programmed resulted in any change in > program behavior, either by run in NetBeans, or run with debug in > NetBeans, or from command line. That is, what I said to print did not > print when I fully expected it to print. There are > System.out.println's in the source code that work, but mine don't > work, nor do my changes in their's work. So, I figured this must be > something I don't understand about CVS. Thus, I started all over with > a fresh copy (hundreds of source files) in a separate directory > except I systematically deleted every CVS-related subfolder, and > imported the entire modified source tree over again. Now there is no > evidence whatsoever that CVS is in the story. NEVERTHELESS, the exact > same phenomena recur. I even systematically commented out (with // ) > every System.out.println in BSMainFrame.java, and yet the printouts > still appear, either inside the NetBeans output window, or in a > command line window. Be reminded, the compiled code runs perfectly > well as a jabber client. Ultimately, I intend to add very interesting > functionality to this open source code. I am completely mystified so > your advice will be most helpful, thank you. > |
|
|
Re: Compiles and Runs Without New Program Behavior ExhibitedAt 10:44 AM 6/22/2007, you wrote:
>Have you done a "Clean and Build Main Project"? > >dcm Yes, in fact I routinely do "Clean and Build Main Project". An example of the problem is this. In the source code we have // inits components //System.out.println("loading GUI..."); and in the output window we get compile: run: loading preferences... initializing core... BSCore constructor BSConnectionBean constructor loading GUI... loading sounds... which is a contradiction. |
|
|
Re: Compiles and Runs Without New Program Behavior Exhibited"Ellis D. Cooper" <xtalv1@...> writes:
> At 10:44 AM 6/22/2007, you wrote: >>Have you done a "Clean and Build Main Project"? >> >>dcm > > Yes, in fact I routinely do "Clean and Build Main Project". An example > of the problem is this. In the source code we have > > // inits components > //System.out.println("loading GUI..."); > > and in the output window we get > > compile: > run: > loading preferences... > initializing core... > BSCore constructor > BSConnectionBean constructor > loading GUI... > loading sounds... > > which is a contradiction. Well then, it is obvious, but not easy to find. You simply _can't_ be running the binary that you are compiling. Somewhere in your path there must be an earlier version. Do some kind of FIND, and locate any and all .jar or .exe files with the same name as yours. There has to be one there! Good luck! Dave |
|
|
Re: Re: Compiles and Runs Without New Program Behavior ExhibitedDave
At 01:30 PM 6/22/2007, you wrote: >Well then, it is obvious, but not easy to find. You simply _can't_ >be running the binary that you are compiling. My thought exactly. That is why I elevate this problem to the level of mystery. > Somewhere in your path there must be an earlier version. Do some > kind of FIND, and locate any and all .jar or .exe files with the > same name as yours. There has to be one there! Absolutely. OK, so I used XP Windows Explorer to do a FIND on *.jar throughout my c:\ drive. Now, my source files are in ...\bs28d and my \dist directory is under another directory called b28d (note absence of the "s"). In \dist there is found b28d.jar, and that is the ONLY copy of the binary on the c:\ drive. Moreover, I had created a new class file called NewClass.java in the same package with the BSMainFrame.java file. After compiling I used jarlook to see inside of b28d.jar. Sure enough, NewClass.class is in there. edc |
| Free embeddable forum powered by Nabble | Forum Help |