IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New $DEITY Help Me.
Hello all,

I cannot BELIEVE I am asking this, but I have a Java question. Man, I *hated* writing that. Anyway, here's the scoop. First of all, I *barely* know what I'm talking about here with respect to how all this schtuff works together. We're running a horrific application on tomcat. There's a bunch of jsp pages and more than a few .class files that magically get used by some of the jsp pages. There's a bug in one of the .class files and I believe I have found the .java file associated with the .class file with the bug in it. It is a trivial fix, but I have *no idea* how to compile the .java file and get it properly registered with tomcat so that the bug goes away.

I *think* if I simply make the code changes required and then compile the .java file, I'll get a .class file that I can copy to the location of the existing one and all should be well. What I'm not certain of is if there are any special switches I have to use with javac so that the resulting .class file will work properly with tomcat. I'm sure I'll have myriad environment variables that'll have to be set, but if any of you java goobs can give me a simple how-to I'd appreciate it.

TIA.
bcnu,
Mikem

Microsoft Vista. The best reason ever to buy a Mac.
New Re: $DEITY Help Me.
First, make a backup copy of all of the files that are currently running this application under Tomcat. That'll give you a baseline (albeit broken) to return to if your future changes don't work.

Next, make the fix in the .java file and compile it. If your .java file is in the c:\\Documents and Settings\\moffitt\\application_name\\src\\com\\mycompany directory, then you'll want to be in the c:\\Documents and Settings\\moffitt\\application_name\\src directory, and run javac com\\mycompany\\Filename.java. The output of that should be a .class file in the same directory as the .java file. (I'm assuming here that your application does not have an Ant build.xml file, which would likely simplify things.)

Finally, shut down Tomcat, copy the .class file from where it's just been created into exactly where it is inside the Tomcat directory structure, and start the Tomcat back up.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New He might not need to restart
If the development options are turned on.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Thanks!
I'll give it a whirl.

Nit: Why do you think I'm running Winders? The coolest thing (maybe the only cool thing) about my job is that my desktop at work for the past two years has been Linux. :0)
bcnu,
Mikem

Microsoft Vista. The best reason ever to buy a Mac.
New Sorry...
It was an assumption, because 95% of the world (as we all know) runs Winders.

I've been running a Linux desktop for many Internet-eons as well. It's a thing of beauty...And since I am a Java dev, there's really no reason I have to run Windows.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New No offense.
I'm thinking of pushing MacBooks for our sales guys next year as upgrades to their winders notebooks. I might be on crack, but if I can avoid Vista, I'm gonna try. ;0)
bcnu,
Mikem

Microsoft Vista. The best reason ever to buy a Mac.
New Re: $DEITY Help Me.
I believe I've said this before, but...
First of all, I *barely* know what I'm talking about here with respect to how all this schtuff works together.
And yet you feel qualified to bag on Java...

People like Todd, Mike, and I (and probably others here) actually know what we're talking about when we slam it.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New How long has it been since I "bagged on java"?
Thanks, btw, for the help. I'm sure I've slammed java before sometimes with and sometimes without justification. I think I even complemented LimeWire as a java application. I don't like Java. It seems overly complex and, like much of the old VB6 codebase, is far too often poorly done. But I don't think I've ever been real harsh on jsp. I prefer PHP because it has fewer moving parts and does what I need it to do. I'll admit I've cracked on Java applications and the UI components and I stand by that. None of the Java applications I've ever had to use have worked well (iSeries Navigator, EnterpriseDB's admin tool, etc.) They tend to be clunky, feature lacking and slow - not to mention the myriad JDK incompatibilities. Again, that could be a developer problem, but given the complexity of the development platform, I think some of the blame can correctly rest with the architecture of that platform.

If you took the above "$DEITY help me" and "I hate having to ask this..." stuff as a slam to Java, it wasn't intended. I hate doing anything I'm this uncertain about and it appears to me that there is much more to do here than I know or even care to know about. For instance, in this case, the code change is trivial. All I'd have to do if this was PHP is make the code change. See, I'm really lazy. ;0)

I'm only trying to do this because the person here waiting for this to be done is a friend of mine and the Java consultants he hired (the original authors of this app) have been here for 2 billable days and still can't manage to synch up their local versions of tomcat, the jdk, the jdbcc connectors, etc. to actually do the work they were hired to do.
bcnu,
Mikem

Microsoft Vista. The best reason ever to buy a Mac.
New Why Java Sucks: The Roman Army Language
I prefer PHP because it has fewer moving parts and does what I need it to do.

The problem with Java is that you are flooded with Java's frameworks and other frameworks, like Tomcat, that force a certain strait-jacket on you. What I've learned to do is collect light-weight "micro-frameworks" for dynamic languages that can be tossed, modified, or ignored as needed to get the job done. You date micro-frameworks, not marry them. They are a series of functions that one puts into an INCLUDE file.

Often I modify a copy for a particular application. This violates true factoring, but true factoring (aka pure reuse) for domain libraries has never worked right. The Ultimate Generic Thing ends up being an explosion of features needed to handle each blue-moon case like an idealistic feature packrat. It is easier to add niche features to a "core" sample than to try to have a shared version with every niche feature and a giant interface.

Some say microframeworks would not work in a bigger shop that needs to enforce a constistent rowing pattern as the whip is snapped to a rythm, and perhaps they are right. But I try to avoid big beurocratic shops for that reason. Java reflects it's targeted culture: Big tangled money lost in big tangled red-tape armies. I'll take lean and nimble frameworks with dynamic languages instead.
________________
oop.ismad.com
New Tomcat is a framework?
New This Is The Internet.
Knowing Your Subject Is Not Required.


Peter
[link|http://www.no2id.net/|Don't Let The Terrorists Win]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Home]
Use P2P for legitimate purposes!
[link|http://kevan.org/brain.cgi?pwhysall|A better terminal emulator]
[image|http://i66.photobucket.com/albums/h262/pwhysall/Misc/saveus.png|0|Darwinia||]
New Amen for iSeries Navigator!

Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New If you're lucky, ant
If there's a build.xml among the mix of files, then the project is set up to be built by 'ant'.

Dig through it looking for something that looks like <javac ...>
It'll be nested in something that looks like <target name="something">. That something is the option you'll want to give to ant on the command line. Use that to tell if your fix compiles.

Then look at the other <target>s. One of them will build the .war file. Or, if you're lucky, there'll be an action that builds everything and deploys.

And yeah, back *everything* up first.

New Error: $DIETY not found. No such variable exists.
________________
oop.ismad.com
New Thanks all. Got it working with Yendor's help.
bcnu,
Mikem

Microsoft Vista. The best reason ever to buy a Mac.
New Whee!
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New $DEITY="Yendor"

------

179. I will not outsource core functions.
--
[link|http://omega.med.yale.edu/~pcy5/misc/overlord2.htm|.]

     $DEITY Help Me. - (mmoffitt) - (16)
         Re: $DEITY Help Me. - (Yendor) - (4)
             He might not need to restart - (admin)
             Thanks! - (mmoffitt) - (2)
                 Sorry... - (Yendor) - (1)
                     No offense. - (mmoffitt)
         Re: $DEITY Help Me. - (admin) - (5)
             How long has it been since I "bagged on java"? - (mmoffitt) - (4)
                 Why Java Sucks: The Roman Army Language - (tablizer) - (2)
                     Tomcat is a framework? -NT - (Simon_Jester) - (1)
                         This Is The Internet. - (pwhysall)
                 Amen for iSeries Navigator! -NT - (imric)
         If you're lucky, ant - (dws)
         Error: $DIETY not found. No such variable exists. -NT - (tablizer)
         Thanks all. Got it working with Yendor's help. -NT - (mmoffitt) - (2)
             Whee! -NT - (Yendor)
             $DEITY="Yendor" -NT - (Arkadiy)

It was the internet of the day. It was delivered by Fiber Coptics.
236 ms