Robert Konigsberg

Ranch Hand
+ Follow
since Jun 23, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Robert Konigsberg

Hello,

Does MyEclipse use WST as part of its web component strategy? I ask because I have written a plug-in that extends the WST XML / HTML editors. I presume that if WST doesn't get supplied with MyEclipse, I just need to install it (along with all the other components). Still it would be nice to know what sort of work I have in store (have you ever tried installing WST? First you need GEF, then you need DTP ... it gets really irritating.)

Thanks, Robert
I'm sure this question comes up alot -- I'm just not sure if it's worth spending time with Groovy. It looks great, sure, but I've heard two things:

1. It's not getting the favorable attention from Sun that jruby enjoys.
2. It's a dead-end scripting language.

Who can tell me why this is better to use than beanshell or jruby?
11 years ago
Yes, Theo, relax. Wait it out and see what happens.
To be honest, the easiest way to do that is with the unix utility 'sed', or with the find/replace functionlaity of most any text editor. If you really want to use Java, look at the regexp package, and I believe there's a String.replace method as well.
13 years ago
You're not going to like my first answer: Write unit tests and then start teasing apart your code, consistently retesting.

Second answer: use Emma (emma.sourceforge.net) which, as a code coverage tool will should help you identify code that is run as code that is not. Then step through your entire application.

Third answer: Write a custom classloader that serves as a proxy to another classloader. This proxy classloader will log all classes it opens.

You should really consider #1, cause otherwise you're flying blind.
13 years ago
In other words, if you have, in one file:

---Sample.java---
// First class defined
public class Sample {
// Second class defined
class Foo implements Bar {
...
};
private func() {
// Third class defined
blah = new Comparable() {
...
};
}
}

// Fourth class defined
class YaYaYa {
}

See how four separate classes have been defined in this example? One .java file will create four .class files. Why? That's just the way they did it, I don't know.
13 years ago
Mark,

Please provide much more information. What output do you receive? Most likely you will receive an exception, which is a great guide. If you receive no exception, that says alot as well.

Also, have you tried using either a debugger, or using System.out.println statements in your code to see what the real values are? Try that and see what you find.
13 years ago
That's teriffic. 30 hours is definitely a very low amount, and for people looking to push through, that's good to know. Congratulations!
13 years ago
It has not be 18 months since 1.5 was introduced. This post from James Gosling suggests it was released in September '04:

http://today.java.net/jag/page12.html#100
Just to be a PITA, it sounds like you actually 'second' my second hypothesis. Yes?
1. Which line in your snippet is line 153?
2. Which variable is null? If you can't step through with a debugger, you can always use lots of 'if (blah == null)' everywhere, including stuff like 'if (clientGUI.getCustomerText() == null)'.
3. Finally, were you loading any additional classes or source files in your application?

That's a start.
It sounds like one of two things is happening:

1. You're not aligning your reads correctly (are you sure you are reading at the correct offset?)
2. You're not interpreting the data correctly (not an int? wrong endian?)

Is the data after the size field being read properly? I don't know about your assignment, so I can't make any presumptions, like, the data after size is 'size' bytes.

Reading your resource as a stream of bytes (if it's a file, view the file with some binary file viewer, or print out the stream of bytes to stdout, or use the Unix or Cygwin tool 'od') to make sure you're actually reading everything correctly up to that point.

Finally, try to step through it with a debugger.
Andy, I got hit because my grader didn't read my installation instructions.

My suggestion is to (if you already haven't):
1. take your submission .jar
2. dejar it into a brand new directory
3. Follow your user guide for any other installation instructions
4. See if you are missing something.

If it still works, try this:
Repeat the above, but assume the grader isn't reading your directions.

LOL.

This sucks, good luck!
Yeah, well then, that was a good discussion. Someone else will probably bring it up in about two months.



( All of a sudden I feel like I'm part of The Matrix Reloaded. )