JAVA service error......

[COLOR=Green]Hi am new in wM.i am using wM 6.1 version.I am trying to write a java service but i am getting following err.[/color]


[COLOR=Red]The source was saved, but was not compiled due to the following errors:[/color] ‘ourjava’ >> java.lang.UnsupportedClassVersionError: ourjava (Unsupported major.minor version 49.0)


[B]I have resolved one error and now getting following error:-

Could not run ‘ourjava’.[/b] [ISS.0026.9102] Service ‘MYJAVA: ourjava’ is not operational. To run this service, first recompile the Java source.

The source was saved, but was not compiled due to the following errors:
Failed to load Main Class:

Any assistance will be appreciable

I have faced to this exception. Please correct me if i am wrong. Upto me this is an issue with the JVM version. Seems the JVM does not support an advanced feature that we might have used in the code.

This is Java error. Google would have provided you with answer you’re looking for.
This exception can occur when the source is built targeting a JDK that is not supported by the JDK attempting to run it. Check IS’s compiler version and the JDK version your code (including any imported Jar) targets.


Open server.bat and check if property JAVA_DIR is pointing to the jvm folder. For example
SET JAVA_DIR=C:\webMethods65\jvm\win142



U r going good… but I think u r forgetting something to set for this error…

From my perspective v must hv to set classpath for jvm from webmethod…
Please do it…U will get resolve ur problem…

and do one more thing is remove all other java means jdk…

In webMethod dont use jdk 1.6…


You can also point at concrete javac, by modificating those values using WmRoot web administration console:

Settings > Extended

Extended Settings Key=Value

watt.server.compile=javac -classpath {0} -d {1} {2}
watt.server.compile.unicode=javac -encoding Unicode -classpath {0} -d {1} {2}

Extended settings are typically provided by webMethods Support

to i.e.:
watt.server.compile=/usr/java/sun/jdk/1.4.2/bin/javac -classpath {0} -d {1} {2}
watt.server.compile=c:/usr/java/ibm/jdk/1.4.2/bin/javac -classpath {0} -d {1} {2}