GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support Compilation on modern JDKs & drop JDK7 support by Baraa-Hasheesh · Pull Request #1590 · async-profiler/async-profiler

Conversation

@Baraa-Hasheesh

@Baraa-Hasheesh Baraa-Hasheesh commented Nov 14, 2025 •
edited by apangin
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description

Currently building the profiler using a modern JDK, such as JDK21 & 25 isn't possible due to the fact that target=7 is no longer supported

This can be easily observed by changing Instrument.java file & running make using java 21/25

async-profiler % make
/Users/bhashesh/.sdkman/candidates/java/25.0.1-amzn/bin/javac -source 7 -target 7 -Xlint:-options -g:none src/helper/one/profiler/Instrument.java
error: Source option 7 is no longer supported. Use 8 or later.
error: Target option 7 is no longer supported. Use 8 or later.
make: *** [src/helper/one/profiler/Instrument.class] Error 2

This compile happens due to the following make target
build/$(LIB_PROFILER): $(SOURCES) $(HEADERS) $(RESOURCES) $(JAVA_HELPER_CLASSES)

which in turn is mapped to

%.class: %.java
	$(JAVAC) -source 7 -target 7 -Xlint:-options -g:none $^

In this change I simply reuse the JAVA_TARGET variable to select source & target which is selected as 8 which is still supported on JDK25

I also updated the .class files by recompiling using -source 8 -target 8 -Xlint:-options -g:none

This change will require dropping JDK7 support in the profiler, but that should be acceptable as JDK7 has been EOLed long time ago, & non of the available pipelines check for JDK7

Related issues

N/A

Motivation and context

  • Improve developer experience by using up-to-date build tools
  • Reduce maintenance burden by giving up JDK 7 support

How has this been tested?

make & make test


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Baraa-Hasheesh
Select javac source target from make variables
64b6b27
@apangin

apangin commented Nov 14, 2025

Copy link
Copy Markdown
Collaborator

The major consequence of this change not mentioned here is that certain profiler features will no longer work with JDK 7.
Yes, there are a few customers running profiler with JDK 7... at least, there were a year ago.

In fact, I think it's time to drop JDK 7 support in async-profiler, and therefore welcome this change, but this needs to be called out explicitly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Baraa-Hasheesh

Baraa-Hasheesh commented Nov 14, 2025

Copy link
Copy Markdown
Contributor Author

@apangin is there a specific location of the documentation that need to be updated to reflect this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apangin

apangin commented Nov 14, 2025

Copy link
Copy Markdown
Collaborator

This PR.
Title, description and motivation.
In that way, this will get in the release notes (release notes are compiled from Issue and PR titles with the references to the corresponding issues).

Baraa-Hasheesh reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Baraa-Hasheesh Baraa-Hasheesh changed the title Allow Profiler to compile with JDK25 Support Compilation on modern JDKs & drop JDK7 support Nov 14, 2025
@Baraa-Hasheesh

Baraa-Hasheesh commented Nov 14, 2025

Copy link
Copy Markdown
Contributor Author

@apangin title & description updated

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apangin
apangin merged commit 0b7ee6d into async-profiler:master Nov 14, 2025
@apangin apangin mentioned this pull request Oct 8, 2026
Cleanup obsolete patches #1820
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Baraa-Hasheesh @apangin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.