jump to navigation

where is the freakin tomcat?!?! February 20, 2006

Posted by Phillip in : geek , 1 comment so far

I am sitting in class wondering if we are ever going to stop talking about programming and start talking about Tomcat. I am getting frustrated with all of the java programing. I wish to learn how to do performance tuning on tomcat. Sorry I can’t say more about that right now. Here is a command-line java calculator:

public class Calc {
public static void main(String[] args) {
if (args.length < 2) {
System.err.println("Usage: Calc …”);
return;
}
char op = args[0].charAt(0);
double result = Double.parseDouble(args[1]);
for (int i = 2; i < args.length; i++) {
double operand = Double.parseDouble(args[i]);
switch (op) {
case '+': result += operand; break;
case '-': result -= operand; break;
case '*': result *= operand; break;
case '/': result /= operand; break;
default: System.err.println("Invalid operator: " + op);
return;
}
}
System.out.println(result);
}

private static boolean isNumber(String s) {
return s.matches("(\\-|\\+)?[0-9]+(.[0-9]+)?");
}
}

wavajeb

Posted by Phillip in : geek , 1 comment so far

I think this is the first real chance I have had to take a deep breath since my last blog entry. I am sitting in a Tomcat class and breatihng an easy sigh of relief because I am not worrying about SIM. The initial deployment went well. Sure, there were some “bumps in the road” but we now have a working enterprise-class Identity Management solution. On a side note, here is my first java program:

public class myfirstprogram
{
public static void main(String [] args)
{
System.out.println("Hello, Java");
}
}

Neat huh? Apparently the first part of the tomcat class is writing java. Unfortuantely, wp doesn’t like to format it correctly. This should be fun. :(