Skip to content

Support java executable in path #1215

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

Merged
merged 3 commits into from
Jun 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Support java executable in path
  • Loading branch information
Jamie-SA committed Apr 25, 2025
commit 12916fbb0ef8e90a1eddf13f4db12f656c59d63e
19 changes: 8 additions & 11 deletions tools/serializer/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,20 @@ function findJava() {

java_home=""

if [ "${RDF_TOOLKIT_JAVA_HOME}" != "" ] ; then
java_home="${RDF_TOOLKIT_JAVA_HOME}"
fi
if [ "${JAVA_HOME}" != "" ] ; then
java_home="${JAVA_HOME}"
fi
if [ "${java_home}" == "" ] ; then
log_error A-$JAVA_HOME
log_error "Please set RDF_TOOLKIT_JAVA_HOME or JAVA_HOME to point to a Java ${min_java} or later installation."
return 1
if [ "${RDF_TOOLKIT_JAVA_HOME}" != "" ] ; then
java_home="${RDF_TOOLKIT_JAVA_HOME}"
fi
java_home=${java_home/C:\\/\/c\/}
java_home=${java_home//\\/\/}
log "java_home =" ${java_home}

if [ -x "${java_home}/bin/java" ] ; then
whichJava="${java_home}/bin/java"
elif [ -x `which java` ] ; then
whichJava=`which java`
else
log_error "Could not find java in your RDF_TOOLKIT_JAVA_HOME or JAVA_HOME: ${java_home}."
log_error "Please set RDF_TOOLKIT_JAVA_HOME or JAVA_HOME to point to a Java ${min_java} or later installation."
Expand Down Expand Up @@ -146,13 +143,13 @@ function serialize() {
esac

log "Target format is $tfmt"
if [[ $file =~ .*About.* ]] ; then

if [[ $file =~ .*About.* ]] ; then
log "Skipping unsupported file $file"
return 0
fi

if [[ $file =~ .*OWL.* ]] ; then
if [[ $file =~ .*OWL.* ]] ; then
log "Skipping unsupported file $file"
return 0
fi
Expand Down Expand Up @@ -185,7 +182,7 @@ __log_config__
--use-dtd-subset \
--string-data-typing explicit \
--suppress-named-individuals \
--inline-blank-nodes
--inline-blank-nodes
rc=$?
set +x

Expand Down