Can you make the inner classes named instead of anonymous? That might help you determine which is the problem.
James Stauffer -----Original Message----- From: Tom Jordan [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 10:14 AM To: JDJList Subject: [jdjlist] RE: How Ant compiles vs. how JBuilder compiles > From: Gregory A. Swarthout [mailto:[EMAIL PROTECTED]] > I've noticed in the past that the outputs of each compile are slightly > different, though until this one modification to my class, the > difference made no difference. The problem comes into play > serializing an inner class. Try removing each inner class until the problem goes away. When you have determined the offending inner class, examine it for any peculiarities. Temporarily delete sections of if until the problem goes away. Modify the offending section until it works in both JBuilder and javac. I am using JBuilder 7 with JDK 1.4.1_01 and also use build scripts and a make file to build our source code on UNIX using javac with JDK 1.4.1_01. FWIW here is the relevant line in our build script: echo "Compiling the Java files with the following environment..." echo " CLASSPATH: ${CLASSPATH}" echo " Class output: ${CLASS_OUTPUT}" echo " All of the files in: ${LIST_OF_SRC_FILES}" echo " will be compiled. This file should contain all of the \".java\"" echo " files in the source root directory." echo " Source root: ${SOURCE_ROOT}" echo " This may take a while, please wait..." cd ${SOURCE_ROOT} echo " " $JAVA14_HOME/bin/javac -d ${CLASS_OUTPUT} -sourcepath ${SOURCE_ROOT} @${LIST_OF_SRC_FILES} Tom -----Original Message----- From: Gregory A. Swarthout [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 3:37 PM To: JDJList Subject: [jdjlist] RE: How Ant compiles vs. how JBuilder compiles I've now tried compiling with just javac and the problem is still there. There is something the JBuilder build/compile is doing that javac/Ant is not in generating the class files. I am about at wit's end. Anybody have any more help? Greg Greg Nudelman wrote: > Have you tried just using the javac without the ant to compile that > class? Does the compiled class do what it's supposed to? > > Or, another thought -- you may not be re-compiling ALL of the classes > with Ant, so you got some old class files not-compatible with the new > class structure. I would remove all the .class files and recompile > every single one of them from scratch. In general, I always make this a > part of my Ant build script to remove the old .class files. > > Greg > > -----Original Message----- > From: Gregory A. Swarthout [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 27, 2003 11:53 AM > To: JDJList > Subject: [jdjlist] RE: How Ant compiles vs. how JBuilder compiles > > > Yes, it is set correctly. > > Bill Wang wrote: > > I agree with Greg. You may have different compiler setup in Ant and > > JBuilder. Check the JAVA_HOME env variable in Ant, make sure it > points > > to your jdk1.4 installation directory. You should find this variable in > > the ant.bat file. > > Hope this help. > > > > Bill > > > > > > Greg Nudelman <[EMAIL PROTECTED]> on 01/27/2003 01:14:09 PM > > > > Please respond to "JDJList" <[EMAIL PROTECTED]> > > > > To: "JDJList" <[EMAIL PROTECTED]> > > cc: > > > > Subject: [jdjlist] RE: How Ant compiles vs. how JBuilder compiles > > > > I always thought Ant just used the standard javac. Maybe you're using a > > different version of Java to compile and run the code. Java seems to be > > backward compatable, i.e. if you compile on 1.4, you can run it on > the 1.3, > > but not vice versa. Maybe you have an old javac hanging around > somewhere, > > and that is what Ant is using based on your classpath. I would check > the > > path again, and also try to compile just that problem class with your > > javac, without Ant or JBuilder. Ant is just a build script, like .bat > > file, only easier. > > > > > > Greg > > > > > > -----Original Message----- > > From: Gregory A. Swarthout [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, January 25, 2003 12:24 PM > > To: JDJList > > Subject: [jdjlist] How Ant compiles vs. how JBuilder compiles > > > > > > > > > > > > I'm having a problem with a program I've written and I've traced it to > > the compiler. If I compile with JBuilder using JDK 1.4.1_01, > > everything works as it should. If I compile with Ant's javac task > > using JDK 1.4.1_01 as well, the problem occurs. > > > > > > I've noticed in the past that the outputs of each compile are slightly > > different, though until this one modification to my class, the > > difference made no difference. The problem comes into play > > serializing an inner class. It works correctly when compiled with > > JBuilder, but the program tries to serialize the main class when > > compiled under Ant. > > > > > > I don't know what JBuilder is doing under the covers, so I don't know > > how to fix the Ant compile task. > > > > > > The one obvious difference in the outputs is that in addition to: > > > > > > MyClass$1.class > > MyClass$2.class > > MyClass$3.class > > MyClass$4.class > > > > > > only the JBuilder compile also produces the file: > > > > > > MyClass$$5.class > > > > > > (note the two $'s). > > > > > > Anyone know what's going on and/or how to fix it? THIS TRANSMISSION, INCLUDING ANY ATTACHMENTS OR FILES, CONTAINS AIRNET COMMUNICATIONS CORPORATION CONFIDENTIAL AND PROPRIETARY INFORMATION WHICH MAY BE OTHERWISE EXEMPT FROM DISCLOSURE. The information is intended to be for the exclusive use of the individual or entity named above. If you are not the intended recipient, be advised that any disclosure, copying, distribution or other use of this information is strictly prohibited. If you have received this transmission in error, please notify us by telephone at 1-321-984-1990 or by email to [EMAIL PROTECTED] immediately and do not read, print or save this information in any manner. ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________ ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________
