running java with modified standard class files?

  • Thread starter Benjamin H. Brinckerhoff
  • Start date
B

Benjamin H. Brinckerhoff

All,

Is there any way to edit the standard included java files (e.g.
AbstractDocument) in order to put in testing code to help debug apps?
I tried downloading the source code and putting just that source
directory in my classpath, but editing AbstractDocument doesn't seem
to have any effect. Any ideas?

d:/src/ contains the .java files
all the other directories contain my work

my compile line is

javac -classpath "h:/research/mini/;h:/research;h:/pie/;d:/src/" -g
MiniTest.java

javaw -classic -classpath
h:/research/mini/;h:/research;h:/myclasses/;d:/src/;h:/pie/ MiniTest

I guess my other option is to use a debugger. Anyone know of any good
(and preferably free) ones that are good for debugging swing stuff?
Thanks a lot in advance.

Ben Brinckerhoff
 
W

Wolfgang Vullhorst

All,

Is there any way to edit the standard included java files (e.g.
AbstractDocument) in order to put in testing code to help debug apps?
I tried downloading the source code and putting just that source
directory in my classpath, but editing AbstractDocument doesn't seem
to have any effect. Any ideas?
Hi,
you can put a jar containing the modified AbstractDocument class into the
<JRE>/lib/endorsed folder to replace it with the original.

Wolfgang
 
W

Wolfgang Vullhorst

Benjamin H. Brinckerhoff said:
All,

Is there any way to edit the standard included java files (e.g.
AbstractDocument) in order to put in testing code to help debug apps?
I tried downloading the source code and putting just that source
directory in my classpath, but editing AbstractDocument doesn't seem
to have any effect. Any ideas?

d:/src/ contains the .java files
all the other directories contain my work

my compile line is

javac -classpath "h:/research/mini/;h:/research;h:/pie/;d:/src/" -g
MiniTest.java

javaw -classic -classpath
h:/research/mini/;h:/research;h:/myclasses/;d:/src/;h:/pie/ MiniTest

I guess my other option is to use a debugger. Anyone know of any good
(and preferably free) ones that are good for debugging swing stuff?
Thanks a lot in advance.

Ben Brinckerhoff

Oops, perhaps I should have read your posting completely... ;-)
Putting the modified source file into a classpath has no effect anyway. You
have to recompile the class, put it into a jar file (with complete package
name) and place the file in the "<JVM>/lib/endorsed" folder...

Wolfgang
 
T

Tom Davies

Benjamin said:
All,

Is there any way to edit the standard included java files (e.g.
AbstractDocument) in order to put in testing code to help debug apps?
I tried downloading the source code and putting just that source
directory in my classpath, but editing AbstractDocument doesn't seem
to have any effect. Any ideas?

d:/src/ contains the .java files
all the other directories contain my work

my compile line is

javac -classpath "h:/research/mini/;h:/research;h:/pie/;d:/src/" -g
MiniTest.java

javaw -classic -classpath
h:/research/mini/;h:/research;h:/myclasses/;d:/src/;h:/pie/ MiniTest

I guess my other option is to use a debugger. Anyone know of any good
(and preferably free) ones that are good for debugging swing stuff?
Thanks a lot in advance.

eclipse and netbeans have debuggers.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top