eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[cg] JDK required for naive launch #1799

Open eclipse-ocl-bot opened 2 months ago

eclipse-ocl-bot commented 2 months ago

| --- | --- | | Bugzilla Link | 511461 | | Status | REOPENED | | Importance | P3 normal | | Reported | Feb 01, 2017 07:24 EDT | | Modified | Feb 04, 2017 16:32 EDT | | Reporter | Ed Willink |

Description

Attempting to launch an out-of-the-box UMLX transformation fails with a JDK rather than JRE required diagnostic.

Normally works for me, since my Eclipse launch shortcuts include -vm "%JAVA_HOME%\bin\javaw.exe" to use a system-defined Java version.

How does an ordinary user adjust to use a JDK?

Do we really need a JDK? needed for javac, but could we use JDT instead?

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Feb 01, 2017 08:02

(In reply to Ed Willink from comment #0)

How does an ordinary user adjust to use a JDK?

Setting JAVA_HOME should work, but I set it as a User variable. Maybe it has to be a System variable.

A -vm option in eclipse.ini is recommended.\

Do we really need a JDK? needed for javac, but could we use JDT instead?

Should we have a JVM option in the launch config, just like ANT etc.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Feb 01, 2017 10:37

(In reply to Ed Willink from comment #0)

Do we really need a JDK? needed for javac, but could we use JDT instead?

The EclipseCompiler can be used. It is more fussy about needing "-source 1.8", but the same fussiness for hidden and overt builds is good.

However there is no public API. see Bug 511480.

As a result of API evolution, OCL and QVTd have at least three compiling classes. Time to rationalize.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Feb 01, 2017 10:41

(In reply to Ed Willink from comment #2)

However there is no public API. see Bug 511480.

Even if JDT responded tomorrow, we still need to use the internal API to provide Neon compatibility.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Feb 02, 2017 12:19

(In reply to Ed Willink from comment #2)

However there is no public API. see Bug 511480.

The relevant package is marked as internal, which inhibits the MANIFESRT from actually referencing it. The Hudson build therefore fails until the compiler.tool bundle is explicitly loaded.

Pushed to master for M6.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Feb 04, 2017 16:32

(In reply to Ed Willink from comment #4)

The relevant package is marked as internal, which inhibits the MANIFESRT from actually referencing it. The Hudson build therefore fails until the compiler.tool bundle is explicitly loaded.

Bug 511480 identifies that ServiceLoader avoids the nedd to access the restricted API, alhough doesn't solve the class loading.

However some JUnit tests on Hudson fail with class not found. Either timing or paths differ between JDK/Eclipse compilers.

JDK usage restored for now.