PDA

View Full Version : Help with Java


Checkmite
1st June 2004, 09:42 PM
So I've downloaded a freeware java class which will put a neat scrolling text effect on my webpage. I've uploaded it and tested it with all the default options, and it works. The readme says that the options can be changed from the default settings - but to do that, I need to open the .class file and edit it. What program do I need to use to open the .class file?

heath
2nd June 2004, 01:31 AM
Any text editor should do it.

Or if you want a nice Java IDE try eclipse (http://www.eclipse.org) . I use it for perl development too with the EPIC plugin.

Checkmite
2nd June 2004, 10:26 AM
Originally posted by heath
Any text editor should do it.

I've tried opening the class with notepad and wordpad; most of what comes up is gibberish. The parameters themselves are legible, but I can't see their setting values.

I will try your suggestion.

heath
2nd June 2004, 10:46 AM
By gibberish do you mean java code or funky non-english characters? If it's the funky stuff you're looking at the compiled version. You'll need the source to edit the class directly and then use a JDK to rebuild it.

Post a link to where you got it from and I'll have a peek (or somebody else in another timezone might while I sleep :) )

ceptimus
2nd June 2004, 03:31 PM
Normally you edit (text) .java file(s) and run those through the java compiler, javac, to produce the binary .class file(s)
Any parameters the java applet needs - scroll speed etc. - would normally be passed as parameters by the host .html (text) file.

Checkmite
2nd June 2004, 09:50 PM
Originally posted by ceptimus
Normally you edit (text) .java file(s) and run those through the java compiler, javac, to produce the binary .class file(s)
Any parameters the java applet needs - scroll speed etc. - would normally be passed as parameters by the host .html (text) file.

So you're saying I would put the parameter changes in the html code on the page where I insert the class, instead of editing the class itself? That had occurred to me; in fact that's what I was going to try this evening.

Edited to add: And of course it worked; thanks ceptimus. I'll go stand in the corner and feel stupid now. :)