Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Java version on generating classes jar file to resolve UnsupportedClassVersion #155

Closed
wants to merge 1 commit into from

Conversation

annaibm
Copy link
Contributor

@annaibm annaibm commented Jun 4, 2024

@annaibm annaibm force-pushed the system_test_javaversion branch 2 times, most recently from e19c94a to 7f6dfcd Compare June 7, 2024 20:54
@annaibm
Copy link
Contributor Author

annaibm commented Jun 10, 2024

@annaibm annaibm changed the title Add Java version to resolve UnsupportedClassVersion Include Java version on generating classes jar file to resolve UnsupportedClassVersion Jun 10, 2024
@llxia
Copy link
Contributor

llxia commented Jun 11, 2024

03:32:01.370  GEN C:/Users/jenkins/workspace/Grinder/jvmtest/system/systemtest_prereqs/sharedClassesTestData/v1/classes_jdk8.jar does not exist
...
03:52:04.468  STF 17:50:46.067 - +------ Step 2 - Copy sharedClasses jar
03:52:04.468  STF 17:50:46.067 - | Copy a file to another directory
03:52:04.468  STF 17:50:46.067 - |   Source file: C:/Users/jenkins/workspace/Grinder/jvmtest/system/systemtest_prereqs/sharedClassesTestData/v1/classes_jdk8.jar

@llxia llxia requested a review from pshipton June 11, 2024 20:08
@annaibm annaibm marked this pull request as ready for review June 11, 2024 20:10
Comment on lines +479 to +485
if (jarDir.exists()) {
// Attempt to delete it
try {
deleteDirectory(jarDir);
} catch (IOException e) {
throw new RuntimeException("Failed to delete existing directory: " + e.getMessage());
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please delete this and deleteDirectory() below

Comment on lines +130 to +135
if (fileDir.exists()) {
try {
deleteDirectory(fileDir);
} catch (IOException e) {
throw new RuntimeException("Failed to delete existing directory: " + e.getMessage());
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete this block

@@ -211,7 +216,8 @@ public void setUp(StfCoreExtension test, StfSharedClassesExtension sharedClasses
.addProjectToClasspath("openj9.test.sharedClasses")
.runClass(JavaGen.class)
.addArg(sharedClassesDataDir.getSpec())
.addArg("10000"));
.addArg("10000")
.addArg(String.valueOf(javaVersion)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add javaVersion as an arg?

Copy link
Contributor Author

@annaibm annaibm Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am passing the javaVersion as an argument to be used by JavaGen.class file, or should we set it as environment Variable or as a static field ?

@llxia llxia requested a review from LongyuZhang June 11, 2024 20:19
- Include Java version number as in  classes_jdk8.jar while generating the classes.jar file.

closes: eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <[email protected]>
@annaibm
Copy link
Contributor Author

annaibm commented Jun 12, 2024

Closing this PR , will raise new PR to address the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SharedClasses.SCM01.SingleCL UnsupportedClassVersionError
2 participants