How do I save as .class ?

I've opened a .class file with DJ decompiler, edited it but cannot save it back to a .class

I get this message:

Because file extension is not RTF file C:\test.java will be saved in Text Format (Plain Text)!

I end up getting a JAD and JAVA file but not an edited .class.

How do i save the edited file as a .class? Anyone know? Please excuse my lack of knowledge, I'm new to java.

Message was edited by:

JD_123

[454 byte] By [JD_123a] at [2007-10-3 3:35:03]
# 1
you'll have to compile it again
lfschucka at 2007-7-14 21:29:41 > top of Java-index,Java Essentials,New To Java...
# 2
Would I need another program to do that? If so can you name one that I could find. And what would I need to compile exactly, one of the files I ended up with? Thanks for the quick reply!
JD_123a at 2007-7-14 21:29:41 > top of Java-index,Java Essentials,New To Java...
# 3
...what about using the same Java Compiler (AKA javac) that you used to compile this class in the first place?probably you will need full source tree to compile, because classes rarely does not reference any other classes in the same source folder (classes of the same
lfschucka at 2007-7-14 21:29:41 > top of Java-index,Java Essentials,New To Java...
# 4
I didn't create the .class, I'm just trying to edit it. I've never messed with java before but I figured editing a class file and saving it wouldn't be to difficult for a beginner. I don't know a thing about Javac. How do I use it, specifically for what said I need to do?
JD_321a at 2007-7-14 21:29:41 > top of Java-index,Java Essentials,New To Java...
# 5

> I didn't create the .class, I'm just trying to edit

> it.

You don't t ypically edit a class file - the .class file is not a text file.

> I've never messed with java before but I figured

> editing a class file and saving it wouldn't be to

> difficult for a beginner.

No, the standard flow is to edit the source code, then compile it to produce the corresponding class file.

> I don't know a thing

> about Javac. How do I use it, specifically for what

> said I need to do?

http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

Good Luck

Lee

tsitha at 2007-7-14 21:29:41 > top of Java-index,Java Essentials,New To Java...
# 6

Thanks for the link. I followed the directions but got this error:

'javac' is not a recognized as an internal or external command, operable program or batch file

So I searched and found this thread:

http://forum.java.sun.com/thread.jspa?threadID=445885&tstart=270

I don't understand what "tschodt" or anyone else is saying. I realize theres a path error but I don't know how to follow their instructions.

"You can either explicitly name javac.exe

C:\foo\bar\> C:\j2sdk1.4.2_01\bin\javac Filename.java"

Huh? what? How? LOL Could you please explain them better, or give me your own instructions?

JD_312a at 2007-7-14 21:29:41 > top of Java-index,Java Essentials,New To Java...
# 7
Read this: http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.htmlPay special attention to step 5.
Herko_ter_Horsta at 2007-7-14 21:29:41 > top of Java-index,Java Essentials,New To Java...