Formate of an exe generated by the java application
I want to read an .exe file generated by a java application through C++ but i don't know the formate of that file. when i open the file in text editor i can't see anything but the symbols.
Can anyone out there tell me what will be the file formate of .exe generated by java application or any other way out
> I want to read an .exe file generated by a java
> application through C++ but i don't know the formate
> of that file. when i open the file in text editor i
> can't see anything but the symbols.
> Can anyone out there tell me what will be the file
> formate of .exe generated by java application or any
> other way out
Which Java application are you talking about that generates exes?
Or do you mean .class files instead, and you want to "read them" from C++?
Lokoa at 2007-7-14 17:49:39 >

Noi have an application developed in java and its output file is .ssf that is an exe file. i want to know the formate of this .ssf file (exe ) file.i can also provide that java application if anyone of you want to see that.Message was edited by:
> No
> i have an application developed in java and its
> output file is .ssf that is an exe file. i want to
> know the formate of this .ssf file (exe ) file.
Now we're getting somewhere. Still, a .ssf file is not a .exe file. And there are several different meanings for .ssf, as a quick google tells us.
Anyway, iIf you developed this application I would expect you to know the format. If you are using some library to generate whatever these ssf's are, then I would expect the documentation for that library to describe it. Finally, if you have downloaded this application, I would again expect its documentation to describe the format.
You cannot expect anyone here to magically know the spec of some file format if you haven't even identified which one you mean.
> i can also provide that java application if anyone of
> you want to see that.
Nooo thanks.
Lokoa at 2007-7-14 17:49:39 >

Let me tell u some functionality of this application as i only have the jar file of this project.
It is a graphical application just like MS Paint but it only draw text with different colors, change background color etc.
i also generate some code of this project through a tool which convert .jar file to java code.
As i don't know much about java so i can't able to understand completely this code.
I am copying the code of action lister of open file menu....
if (e.getSource() == openMenuItem) {
ExampleFileFilter ssfFilter
= new ExampleFileFilter("ssf", "Sedao Scene Format");
chooser.setFileFilter(ssfFilter);
if (System.getProperty("PROPERTY_APPLICATION_KEY")
== "qc2.jar") {
if (getApplicationMode() == 0) {
if (System.getProperty("PROPERTY_LAST_SCENE_DIR")
!= null)
chooser.setCurrentDirectory
(new File(System.getProperty
("PROPERTY_LAST_SCENE_DIR")));
if (chooser.showOpenDialog(this) == 0)
open(chooser.getSelectedFile(), false);
} else if (!((SchedulePanel) schedulePanel).openSchedule())
JOptionPane.showMessageDialog
(this,
"There was an error loading the schedule file. please check it is a valid schedule file.",
"Error Loding Schedule", 0);
} else if (System.getProperty("PROPERTY_APPLICATION_KEY")
== "Overlay.jar") {
if (getApplicationMode() == 0) {
int returnVal = chooser.showOpenDialog(this);
if (returnVal == 0)
open(chooser.getSelectedFile(), false);
} else if (getApplicationMode() == 1) {
boolean result
= ((SmartScheduleDesigner) schedulePanel)
.openSchedule();
if (!result)
JOptionPane.showMessageDialog
(this,
"There was an error loading the schedule file. please check it is a valid schedule file.",
"Error Loding Schedule", 0);
}
}
chooser.removeChoosableFileFilter(ssfFilter);
}
The fact that your java application produced a .ssf file does not mean that all java applications produce a .ssf file. To know the format(whatever you mean by that) of your .ssf file, you have to consult the doc of your application as it is not a java related format but some format introduced to aid the development of your UI tool
Zeeshan, it is up to you to know what kind of ssf file your application works with. Surely there must be some documentation, unless you have reverse engineered this from something you are not supposed to have and reverse engineer - is that the case?
Anyway, giving you the benefit of the doubt... As you can see, there are at least 5 known different file formats using the same extension .ssf:
[url]
http://filext.com/detaillist.php?extdetail=SSF
[/url]
And all we can see in the code is "Sedao Scene Format" and "schedule file", which doesn't point to any of those 5 as far as I can see.
So again, the only one who can provide more info is you.
Lokoa at 2007-7-14 17:49:39 >

I don't have any documentation regarding this application, i only have the executable files (.jar) of this application. Yes reverse engineering is the only option for me but i can't because i am not able to read the output file (.ssf) in any text editor, it just displays the symbols with litle bit text.
by reading the whole code i got that (may be i am wrong) this application is not using any rules for this formate but it just concatinate .ssf with the file name, when saving and check this extension while openning. so can you please tell me that what will be the default fomate of file generated by such java applications which draw figures (like text, line, change color etc). So that i can apply reverse engineering on it.
Message was edited by:
Zeeshan_Baltistani
There is no default format. This is more or less hopeless unless you find the documentation for it. Outside of that you will have to figure it out on your own by some horrible process of testing one bit at a time and seeing what the output is.
There is no such thing as "default format of file". An application decides exactly which bytes to put in a file, and that's what it writes.
How can you not have any documentation? Where did you get this application? And don't you think that if you need to reverse engineer something to find out its file format, maybe you're doing something illegal?
Lokoa at 2007-7-14 17:49:39 >

lolz
i am not doing an illegal work. i don't have anything but the jar files because this code is written by one of my seniors and this is an assignment for me to read the file through c++ and i can't able to understand this file. i can send and output file of this application. if you want to c it.
> lolz
> i am not doing an illegal work. i don't have anything
> but the jar files because this code is written by one
> of my seniors and this is an assignment for me to
> read the file through c++ and i can't able to
> understand this file. i can send and output file of
> this application. if you want to c it.
I think you need to take a step back for a moment. Go and grab a coffee and a walk around. Then come back.
You have a jar file containing an application.
From what we can see, that application opens, displays and/or generated .ssf files.
These files apparently contain graphical information of some kind.
A Java program will not generate files in a "default" format. Neither would graphical information be generated in a "default" format.
A file format is designed in much the same way as an application; you decide on the requirements and define the format to accomodate those requirements.
If this is an assignment from your "senior" you should probably go back to him/her and discuss the problem further. Make a point of telling him that you do not know how to parse the file format.
It sounds as though you have been asked to write a C++ component that is able to parse and display the result of this .ssf file. If that's the case, be prepared for some long nights...
Message was edited by:
marklawford
So ask your senior what the file format is, and preferably give you the source where the file is written.It might be serialized Java objects, in which case you've got a fair old challenge since these are designed be be unserialized back into the original Java objects
It sounds as though you have been asked to write a C++ component that is able to parse and display the result of this .ssf file. If that's the case, be prepared for some long nights...
Oh my God!! i can't compromise on my nights <SMILE>
hey you come with a good understanding of my problem but u terrified me also <smile>
as i generate a code by this jar file .... can it help u guys to solve my problem
> as i generate a code by this jar file .... can it> help u guys to solve my problemYou should solve your problems yourself really. I get the impression that you have no clue what your actual problem is.
i think you didn't read the details of my problem written on first page
Try a hex dump of the file and look out for random stretches of text. If you see quite a few fully qualified class names (separated by dots, some lower case names followed by a capitalised name) it's probably serialised objects.
If that's the case it's fairly insane to try and read it with C++, write a conversion program in Java. It's going to be easier to learn a small amount of Java than to convert a serialized file without it.
If it's total garbage without strings, try running it through gzip. There's a Gzip stream filter in Java so it could be, say, a serialized file which has been defalated to save space.
when i opened this in node pade i found it like this:
t POSITION_O_KEYt com.sedao.attributes.SPositiont SCALE_O_KEYt com.sedao.attributes.Scalet MAXIMUM_SIZE_A_KEYsr java.lang.DoubleJ)k D valuexr java.lang.Number xp@Yt MINIMUM_SIZE_A_KEYsq ~ @Yt
VERSION_A_KEYt
Scale V1.0t CURRENT_SIZE_A_KEYsq ~ @Yt UNITS_A_KEYsr java.lang.Integer?8 I valuexq ~ t TIMESTAMP_A_KEYsr com.sedao.system.TimeStampDgA xr "com.sedao.ExtendableExternalizable]%tw xpt OPENED_A_KEYsr java.lang.Long;?# J valuexq ~ Pt
CREATED_A_KEYsq ~ gq ~
t TimeStamp V1.0t MODIFIED_A_KEYsq ~ Pxt EOOt LAYER_A_KEYsq ~ t ROTATION_A_KEYsq ~ t BOUNDS_A_KEYsr java.awt.Rectangleejjt I heightI widthI xI yxp q ~
t SPosition V1.0t INTERNAL_BOUNDS_A_KEYsq ~ #
t DURATION_A_KEYsq ~ q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ t 060720115340null_OBJECT_O_KEYt com.sedao.elements.TextElementq ~ q ~ q ~ q ~ q ~ sq ~ @Yq ~ sq ~ @Yq ~
t
Scale V1.0q ~ sq ~ @Yq ~ sq ~ q ~ sq ~ q ~ sq ~ Pq ~ sq ~ gq ~
q ~ q ~ sq ~ \xq ~ q ~ sq ~ q ~ sq ~ q ~ "sq ~ #xxq ~
t SPosition V1.0q ~ &sq ~ #vq ~ (sq ~ q ~ sq ~ q ~ sq ~ -q ~ sq ~ gq ~
q ~ q ~ sq ~ @xq ~ t LAYOUT_O_KEYt com.sedao.attributes.SLayoutt ANCHOR_A_KEYsq ~ t JUSTIFICATION_A_KEYsq ~ t CARRIGE_RETURNS_A_KEYsr java.lang.Boolean r? Z valuexp t LINE_COUNT_A_KEYsq ~ q ~
t SLayout V1.0t LAYOUT_A_KEYsq ~ t
PATH_A_KEYsq ~ q ~ sq ~ q ~ sq ~ -q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ t
TEXT_A_KEYt Goldmine Softwareq ~ sq ~ q ~ sq ~ <q ~ sq ~ gq ~
q ~ q ~ sq ~ =fxt LAYOUT_RULES_O_KEYt com.sedao.rules.TextLayoutRulest SECONDARY_RULE_A_KEYsq ~ q ~
t TextLayoutRules V1.0t PRIMARY_RULE_A_KEYsq ~ t TERTIARY_RULE_A_KEYsq ~ q ~ sq ~ q ~ sq ~ ><q ~ sq ~ gq ~
q ~ q ~ sq ~ \xq ~ t SHADOW_O_KEYt com.sedao.attributes.Shadowt BLUR_MARGIN_A_KEYsq ~
q ~
t Shadow V1.0t APPLY_SHADOW_A_KEYsq ~ J t BLUR_RADIUS_A_KEYsq ~ t SHADOW_PAINT_A_KEYsr java.awt.Color3u F falphaI valueL cst Ljava/awt/color/ColorSpace;[ frgbvaluet [F[ fvalueq ~ vxppppq ~ sq ~ q ~ sq ~ -q ~ sq ~ gq ~
q ~ q ~ sq ~ \xt SHADOW_OFFSET_A_KEYsr java.awt.Point?r4~& I xI yxpq ~ t GENERAL_DESCRIPTION_O_KEYt 'com.sedao.attributes.GeneralDescriptiont SHORT_DESCRIPTION_A_KEYt not sett PERMISSION_A_KEYsq ~ t OBJECT_CATAGORY_A_KEYsq ~ t LABEL_A_KEYt
textElement.0q ~ sq ~ q ~ sq ~ ><q ~ sq ~ gq ~
q ~ q ~ sq ~ \xt IS_PRE_A_KEYsq ~ J t LONG_DESCRIPTION_A_KEYt not setq ~
t GeneralDescription V1.0t UNIQUE_ID_A_KEYt 060720115340nullq ~ q ~
t TextElement Version 1.0t PAINT_O_KEYt com.sedao.attributes.SPaintq ~
t SPaint V1.0t COLOUR_1_A_KEYsq ~ tpppt PAINT_TYPE_A_KEYsq ~ q ~ sq ~ q ~ sq ~ \q ~ sq ~ gq ~
q ~ q ~ sq ~
xq ~ t FONT_TYPE_O_KEYt com.sedao.attributes.SFontt MAX_FONT_SIZE_A_KEYsq ~ "t
FONT_A_KEYsr
java.awt.Font?5Vs I fontSerializedDataVersionF pointSizeI sizeI styleL fRequestedAttributest Ljava/util/Hashtable;L namet Ljava/lang/String;xpAK
sr java.util.Hashtable%!J F
loadFactorI thresholdxp?@wsr java.awt.font.TextAttributekx
F xr /java.text.AttributedCharacterIterator$Attributet&G\ L nameq ~ xpt familyt sansserifsq ~ t sizesr java.lang.Float?>< F valuexq ~ AKsq ~ t posturesq ~sq ~ t weightsq ~ ? xq ~ xq ~
t
SFont V1.0t PREF_FONT_SIZE_FONT_A_KEYsq ~ t MIN_FONT_SIZE_FONT_A_KEYsq ~ q ~ sq ~ q ~ sq ~ -q ~ sq ~ gq ~
q ~ q ~ sq ~ @xq ~ t
UI_HINT_O_KEYt com.sedao.attributes.UIHintt GROUP_A_KEYt Publicq ~
t UIHint V1.0t WEIGHT_A_KEYsq ~ q ~ sq ~ q ~ sq ~ -q ~ sq ~ gq ~
q ~ q ~ sq ~ \xq ~ q ~ q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ =Vxt SDO8_SCHEDULE_O_KEYt com.sedao.sd08.SDO8Scheduleq ~
t SDO8Schedule V1.0q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ q ~ jq ~ kq ~ lsq ~
q ~
t Shadow V1.0q ~ osq ~ J q ~ qsq ~ q ~ ssq ~ tpppq ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ |sq ~ }q ~ t
GLOBALS_O_KEYt com.sedao.global.Globalsq ~
t Globals V1.0q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ q ~ q ~ q ~ t not setq ~ sq ~ q ~ sq ~ q ~ t Untitledq ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ sq ~ J q ~ q ~ q ~
t GeneralDescription V1.0q ~ t 060720115338nullq ~ q ~
t
Scene V1.0t EDL_O_KEYt "com.sedao.editors.EditDecisionListt 060720115340null_TIME_LINE_O_KEYt com.sedao.editors.TimeLinet
NAME_A_KEYq ~ t OBJECT_ID_A_KEYq ~ t
MASK_A_KEYsq ~ Jt START_A_KEYsq ~ q ~
t
TimeLine V1.0t END_A_KEYsq ~ q ~ sq ~ q ~ sq ~ =Gq ~ sq ~ gq ~
q ~ q ~ sq ~ =Gxq ~ q ~ sq ~ q ~
t EditDecisionList V1.0q ~sq ~ q ~ (sq ~ q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ =Gxq ~ q ~ q ~ q ~
t SPaint V1.0q ~ sq ~ tpppq ~ sq ~ q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ t LAYER_EFFECTS_O_KEYt !com.sedao.attributes.LayerEffectst LAYER_LIST_A_KEYur [Ljava.util.Vector; 0ho xpsr java.util.Vector?}[; I capacityIncrementI elementCount[ elementDatat [Ljava/lang/Object;xpur [Ljava.lang.Object;Xs)l xp
ppppppppppxsq ~uq ~
ppppppppppxsq ~uq ~
ppppppppppxsq ~uq ~
ppppppppppxsq ~uq ~
ppppppppppxsq ~uq ~
ppppppppppxsq ~uq ~
ppppppppppxsq ~uq ~
ppppppppppxq ~
t LayerEffects V1.0q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ t
OPTIONS_O_KEYt com.sedao.elements.SceneOptionst DYNAMIC_SIZING_A_KEYsq ~ J t SCENE_TYPE_A_KEYsq ~ q ~
t SceneOptions V1.0q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~ q ~ q ~ q ~ t Publicq ~
t UIHint V1.0q ~ sq ~ q ~ sq ~ q ~ sq ~ q ~ sq ~ gq ~
q ~ q ~ sq ~ xq ~>
That looks very much like a serialized object file.And you are saying you have a requirement to read this into a C++ program?
Lokoa at 2007-7-21 9:20:20 >

> That looks very much like a serialized object file.
> And you are saying you have a requirement to read
> this into a C++ program?
The bottom line is that a parser could be written that does build c++ code based on the serialized object in the ssf file. It wouldn't be easy and would probably be a candidate for "worst assignment of the year", which incidentally, is probably how long it will take...
Trust me; It's going to be easier to learn enough java to convert this file than decode it using C++.
The contents of this file are almost certainly a serialised object stream representing a network of Java objects. The good news is that if you include the jar file of the original program on your classpath you can load this network of classes with about 5 lines of java.
If you use a java IDE like Netbeans (which is a free download, by the way) it will be able to analyse the classes in the jar for you and give you names for the various methods in the classes, which will hopefully allow you to understand what data is in the objects. You can then, if necessarilly, write them out in a more C++ friendly format.
Formate of an exeI've heard of ethyl formate but formate of an exe?Okay, here it is:O=CH-O-EXEHope that helps.