cypher2048 / ducky-decode

Automatically exported from code.google.com/p/ducky-decode
0 stars 0 forks source link

encoder.jar craps out under OS X 10.8 #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Trying to run encoder.jar under OS X 10.8 Mountain Lion

What is the expected output? What do you see instead?
Expected output: inject.bin

Instead I get:

Exception in thread "main" java.lang.UnsupportedClassVersionError: Encoder : 
Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

What version of the product are you using? On what operating system?

DuckEncoder 2.2, OS X 10.8.2, Default java installation:

$ java -version
java version "1.6.0_37"

Please provide any additional information below.

I have no experience in java whatsoever, so I'm kind of lost here... Tried 
compiling the source and packaging my own jar file, but had very little success 
in doing so... The "official" duckencode.jar works like a charm, but I would 
really need the swedish keyboard layout.

Original issue reported on code.google.com by anders.m...@gmail.com on 3 Jan 2013 at 10:15

GoogleCodeExporter commented 9 years ago
Current version of Duck Encoder uses Java 1.7.0.  Proof this works is below

Links: 
http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html
http://reviews.cnet.com/8301-13727_7-57423014-263/how-to-install-and-uninstall-j
ava-7-for-os-x/

Proof:

$ /usr/bin/java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

$ java -jar encoder.jar 
Hak5 Duck Encoder 2.2

usage: duckencode -i [file ..]          encode specified file
   or: duckencode -i [file ..] -o [file ..] encode to specified file

Arguments:
   -i [file ..]         Input File
   -o [file ..]         Output File
   -l [file ..]         Keyboard Layout (us/fr/pt or a path to a properties file)

Script Commands:
   ALT [key name] (ex: ALT F4, ALT SPACE)
   CTRL | CONTROL [key name] (ex: CTRL ESC)
   CTRL-ALT [key name] (ex: CTRL-ALT DEL)
   CTRL-SHIT [key name] (ex: CTRL-SHIFT ESC)
   DEFAULT_DELAY | DEFAULTDELAY [Time in millisecond * 10] (change the delay between each command)
   DELAY [Time in millisecond * 10] (used to overide temporary the default delay)
   GUI | WINDOWS [key name] (ex: GUI r, GUI l)
   REM [anything] (used to comment your code, no obligation :) )
   SHIFT [key name] (ex: SHIFT DEL)
   STRING [any character of your layout]
   [key name] (anything in the keyboard.properties)

Original comment by midnites...@gmail.com on 5 Jan 2013 at 9:48

GoogleCodeExporter commented 9 years ago
Alternative to running java 1.7.0, is to compile the program on Java 1.6.X

Compile the src:
$ cd ducky-decode/trunk/Encoder/v2/src
$ javavc Encoder.java
This should generate a class file, to tun the code
$ java Encoder

if it runs, the jar file in ducky-decode/trunk/Encoder/v2/ is essentially a 
zip, mv encoder.class to this dir
$ cd ducky-decode/trunk/Encoder/v2/
$ mv src/Encoder.class ./
$ zip encoder.jar Encoder.class

then run it as normal
$ java -jar encoder.jar

Original comment by midnites...@gmail.com on 5 Jan 2013 at 9:54

GoogleCodeExporter commented 9 years ago
Thanks! Updated my JRE, and now it works!

Thank you for the in-depth replies, and keep up the good work!

Original comment by anders.m...@gmail.com on 6 Jan 2013 at 10:23