aspose file tools*
The moose likes Java in General and the fly likes What type of java object is this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "What type of java object is this?" Watch "What type of java object is this?" New topic
Author

What type of java object is this?

Olivier López
Ranch Hand

Joined: Jan 31, 2010
Posts: 32
Hello People¡¡¡
I need some help with this issue.

I have a java application installed in my pc that storages data in a file with extension .dat
I tried to open that file with netbeans, notepad, wordpad, excell, accent, and im not able to figure out what kind
of file is that and how to compile/edit/use it
I want to extract info from it and be able to use that file in another program im developing right now, but im
new in the java world and you can notice that...
When I open that file with notepad i get some information like "javax.swing.tree.DefaultTreeModel" or "asksAllowsChildrenL", so i can figure out im dealing with a file that have a java tree programmed on it, but i dont know how to make use of the information saved in that tree, or what would be the right extension for that file.

I attach the file to this post to see if you can give me a little help

BTW: The forum is not letting me attach the file as a ".dat" file, so i changed the extension to ".gif", if you download the file, please switch the extension to the original ".dat"

Thanks in advance¡


[PPM.gif]

Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
This is a binary file (not a text file). I suspect that the program has serialized a Java object and wrote the serialized object to the file. The only way to I know how to deserialize it is have the original source do it. From your description, it doesn't sound like you have the source. Perhaps someone else knows a tool that parses serialized data.
Olivier López
Ranch Hand

Joined: Jan 31, 2010
Posts: 32
Tom Reilly wrote:This is a binary file (not a text file). I suspect that the program has serialized a Java object and wrote the serialized object to the file. The only way to I know how to deserialize it is have the original source do it. From your description, it doesn't sound like you have the source. Perhaps someone else knows a tool that parses serialized data.


Thanks for the answer¡
Actually yes, i have the software were i got that .dat file.
The software is inside a folder with the main executable .jar file, a lib folder with many .jar files inside, a couple .conf files in text format... the normal things inside a java application-

I just figured out that i can check how to read the .dat file looking inside the main .jar file.

Inside that .jar file, i found the resources folder, .class files, then another META-INF folder with the manifiest file.

Im reading the info inside some of the .class files, but i havent figured out yet how to use the .dat

Thanks again ;)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

This is no longer about user interfaces. Moving to JiG.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What type of java object is this?
 
Similar Threads
'.dat' file Question.
please help a extreme beginner get started?!?
Issue: File downloads content not being updated under Windows
text data files
Save file without unwanted extensions