permaculture playing cards*
The moose likes Beginning Java and the fly likes opening src.jar ... Need Help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "opening src.jar ... Need Help!" Watch "opening src.jar ... Need Help!" New topic
Author

opening src.jar ... Need Help!

Jennifer Wallace
Ranch Hand

Joined: Nov 30, 2001
Posts: 102
>I have jdk1.2.2 in my computer
> I used this command as given in the "readme" doc
to extract the src.jat file
jar xvf src.jar
> Now to view a class file, when I try to open it
it opens as a notepad and doesnt make much sense
The data is all mixed up.
How do I do it? I see the file type says as Java File. Usually I code my java programs in notepad.
But how do I properly view these files
Thanks,
Jennifer
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Hello,
Just to clarify, have you successfully extracted the .java files from the .jar file and now when looking at a .java file the line breaks aren't present in notepad?
If that is the problem, try opening the .java files in a word processor like Word 2000. The files should now display with the line breaks. From Word 2000, save the files again (as text files) and now try to open them in notepad. This works for me.
Good Luck,
-Dirk Schreckmann
[ February 19, 2002: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Jennifer Wallace
Ranch Hand

Joined: Nov 30, 2001
Posts: 102
Thanks Dirk! I could see the class implementation now in Microsoft Word .

> But is this the only (free) way to get to see the source files of API ? I am just wondering because there are so many files.
> Also, a related Question .. where do I look to learn about notepad and Word etc... just about which program to open what file? I am asking this because this is not the first time I sit here wondering what program should I use to open a file.
Should I dig into a Windows book or is there any other source?
Thanks for ur timely help!
Regards,
Jennifer
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Hello,
JCreator offers a free version of their IDE that will easily open the .java files with the line breaks. There are many, many other text editors that will do the job as well.
Trial and error and your preferences will assist you in figuring out what program to use to open what file.
Good Luck,
-Dirk Schreckmann
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: opening src.jar ... Need Help!
 
Similar Threads
Wrapper class and toString()
TextComponent
can i make a program which start by double click like window application
Source code of Java
How do you Unzip a JAR file