0

I had an entire code in a class Graph2 of my java project. I was trying to use JSmooth to create a .exe file for my program. Then I switched to Launch4j and used it to create the .exe. When I came back to my project, all my source code was gone and this is what it got replaced with:

   < ?xml version="1.0" encoding="ISO-8859-1"?>

   < jsmoothproject>

   < arguments></arguments>

   < embeddedJar>false</embeddedJar>

   < initialMemoryHeap>-1</initialMemoryHeap>

   < mainClassName></mainClassName>

   < maximumMemoryHeap>-1</maximumMemoryHeap>

   < maximumVersion></maximumVersion>

   < minimumVersion></minimumVersion>

   < skeletonName><![CDATA[

   < none>]]>

   < /skeletonName>

   < /jsmoothproject>

Help?

animuson
  • 53,861
  • 28
  • 137
  • 147
  • 2
    its not possible to get source code from exe, try to read it back from your hard disk by some softwares – jmj Nov 27 '12 at 01:58
  • 6
    ... and add the following to your "TO DO - URGENT" list: 1) set up regular backups for your hard drives, and 2) start using version control ... and/or checking in your source code more often. – Stephen C Nov 27 '12 at 02:02
  • 1
    I'm not familiar with JSmooth, but do you have any class files corresponding to the lost code -- in that case a decompiler would at least give you something. – Neil Coffey Nov 27 '12 at 02:21
  • The best would be to use some utility to get back your files... depend on your filesystem! – Alexandre Lavoie Nov 27 '12 at 02:39

1 Answers1

2

1) If you have at least the class files, decompile them. Where can I find a Java decompiler?

2) If you don't, you still have the jar file inside the exe generated by JSmooth (or Launch4j). JSmooth extracts the jar in the default temporary directory, so make a copy of it while your program is running. From the jar file you can get the class files (with an unzip program), then go to point 1)

Community
  • 1
  • 1
lbalazscs
  • 17,474
  • 7
  • 42
  • 50