Book a Demo

Author Topic: Java Automation Interface compile errors  (Read 3642 times)

dmcwhinnie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Java Automation Interface compile errors
« on: May 18, 2007, 08:12:07 am »
I'm getting bad version errors when trying to compile th Java Interface.  I'm using Java 1.5 anyone else done this?

C:\jdevstudio10132\jdk\bin\javaw.exe -client -classpath "C:\jdevstudio10132\jdev\mywork\EA DDL\Client\classes;C:\Program Files\Sparx Systems\EA Trial\Java API\eaapi.jar" client.Class1
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$100(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

at client.Class1.main(Class1.java:12)
Process exited with exit code 1.

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Java Automation Interface compile errors
« Reply #1 on: May 18, 2007, 12:12:28 pm »
There is a file SSJavaCOM.dll that must be visible to the jre you are running. I place mine in JAVA_HOME\bin, works fine.

Make sure that you are using the same version of the dll as the associated JavaCOM_API.jar.

Jim
« Last Edit: May 18, 2007, 12:14:44 pm by jkorman »

dmcwhinnie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Java Automation Interface compile errors
« Reply #2 on: May 21, 2007, 04:55:06 am »
I tried placing the .dll in the java bin folder, and that doesn't work.  you mention the JavaCOM_API.jar file.  I don't have this jar file, I only have eeapi.jar.  Where would I find this jar file?

What version of Java should I be using?
« Last Edit: May 21, 2007, 05:04:29 am by dmcwhinnie »

dmcwhinnie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Java Automation Interface compile errors
« Reply #3 on: May 21, 2007, 05:22:22 am »
Turns out I needed a newer Java version.  Installed 1.6 and it seems to be working now.