Skip to main content
10-Marble
February 16, 2023
Solved

Windchill JAVA_HOME

  • February 16, 2023
  • 2 replies
  • 2122 views

Hello Community,

 

Is it possible to use the system variable JAVA_HOME in the Windchill settings (site.xconf and thus also wt.properties, etc.)? We have an automated update process that updates Java every three months. This also changes the path to the JAVA_HOME directory every time.

 

Many greetings

Best answer by dnordin

Sebastian,

Whether you're on Linux or Windows, you can create a directory link for "Java" and use that link path in your Windchill setup. When a new Java version is installed, you only need to update the link to point to the new java version path.  The link update can be incorporated into your automated java update process.

 

On Linux, lookup symbolic links. On Windows, look up junctions (mklink.exe /? for help).

 

For example, create a link "C:\PTC\Windchill\Java" that points to "C:\Program Files\Java\<your java version>". Use the link path "C:\PTC\Windchill\Java" in all your Windchill settings.

 

Regards,

Dan N.

2 replies

dnordin16-PearlAnswer
16-Pearl
February 16, 2023

Sebastian,

Whether you're on Linux or Windows, you can create a directory link for "Java" and use that link path in your Windchill setup. When a new Java version is installed, you only need to update the link to point to the new java version path.  The link update can be incorporated into your automated java update process.

 

On Linux, lookup symbolic links. On Windows, look up junctions (mklink.exe /? for help).

 

For example, create a link "C:\PTC\Windchill\Java" that points to "C:\Program Files\Java\<your java version>". Use the link path "C:\PTC\Windchill\Java" in all your Windchill settings.

 

Regards,

Dan N.

10-Marble
February 17, 2023

Thanks  a lot. I think we will create a directory link to use the always the same path for java.

14-Alexandrite
February 16, 2023

We always use the zip version of Java so we don't run into this issue.

 

Just create your E:\ptc\Java folder, unzip your Java installation into. You dont have to worry about the path changing, the version number, etc. 

 

That way it wont auto update and break stuff.