Shop OBEX P1 Docs P2 Docs Learn Events
uploading a program FROM the Javelin? — Parallax Forums

uploading a program FROM the Javelin?

MagnusMagnus Posts: 18
edited 2005-09-06 21:01 in General Discussion
After a fatal disk crash i have lost all my recent Javelin code. Is there any way to backup the program that is stored in the javelin memory. I guess it´s impossible to recreate the Java code, but i would be helped to be able to store the last working version i havew in the Javelin while writing and testing my new code. I hop this made sence...

Best regards

Magnus

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-30 14:01
    The source code is compiled to bytecodes before downloading to the Javelin (for its JVM), and there is no [noparse][[/noparse]that I know of] way to recreate any kind of source from bytecodes.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • MagnusMagnus Posts: 18
    edited 2005-08-30 15:43
    No, that´s what i guessed. But is there a way to dump the bytecode form the javelin just to keep a working version of the code while developing the new? If i for any reason fail in developing the new code, i could then downlode the bytecode back to the javelin.

    Magnus
  • MagnusMagnus Posts: 18
    edited 2005-08-30 15:48
    If the code in the Javelin realy is Java bytecode it might be possible to decompile it.
    There is software that does that. For example:
    http://members.fortunecity.com/neshkov/dj.html

    Magnus
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-30 16:30
    Getting it out is the trick -- there is nothing in the Javelin that supports the extraction of bytecodes; you would have had to code that into your program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • MagnusMagnus Posts: 18
    edited 2005-08-30 21:09
    Well,
    It was worth the try to ask. I'm allready on the way rewriting everything... They say this is the best way to get better software anyway...

    It just takes some some time...

    /Magnus
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-30 22:12
    Remember the other thing they say: Save early, save often.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • NateNate Posts: 154
    edited 2005-09-02 15:19
    This thread made me start remembering my BSEE days;·

    I·know that you can recreate assembly code from the machine code (1 to 1 mapping), but it is (was?) almost impossible to recreate a higher level level language from machine code.· Why is this?·

    If you knew the compiler used (and its algorithms) would·it be possible?



    Nate
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-09-06 14:53
    Nate: Theoretically possible, in practice no. It turns out there's a loss of knowledge involved in the compilation process. You lose comments, of course, but you also lose variable naming, typing information, etc. Also, optimizations remove some of that "one to one mapping" needed to regenerate the source code.

    There do exist Java bytecode decompilers. Using them can be very educational -- but you STILL lose meaningful variable names.
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-09-06 21:01
    That question is akin to asking if you simplify a boolean expression to it's simplest form why can't you get back your more complex statement-

    It may be possible to get *A* version of the higher level language code that FUNCTIONS, but not get THAT EXACT CODE (here is where the improbability engine kicks in)-

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke

    Parallax Tech Support
    rclarke@parallax.com
Sign In or Register to comment.