Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello folks,
I'm trying to get the AfterLoader set up... when following the instructions for running the following
javac -classpath %CLASSPATH%;%WT_HOME%\srclib\tool\Annotations.jar -d %wt_home%\codebase AfterEDRloader.java
i get a invalid flag error... I'm a touch new... I don't think there are environment variables set on my install. What would my %CLASSPATH% be set to?
Thanks for any help.
Solved! Go to Solution.
See attached doc when I put this in a few years ago. Had same issue - solved by setting java path in the cmd window.
as in... what would the path be so I can just type the path into the command....
You can alternatively run below command first:
1. set CLASSPATH=%WT_HOME%\srclib\tool\Annotations.jar;%WT_HOME%\srclib\tool\AnnotationProcessing.jar;%CLASSPATH%
(Make sure your WT_HOME is set)
2.
javac -d %WT_HOME%/codebase ext/company/wvs/AfterEDRloader.java
(ext/company/wvs is where you stored your AfterEDRloader.java file)
I don't believe %WT_HOME% is set
I can just type in the path yes? would i need quotations for the path?
Ok... i just used the paths... i did get the following... is this ok?
C:\PTC\Windchill_11.2\Windchill\src\com\ptc\wvs\util>javac -d C:\PTC\Windchill_11.2\Windchill\src\com\ptc\wvs\util AfterEDRloader.java
warning: Supported source version 'RELEASE_7' from annotation processor 'com.microsoft.azure.management.apigeneration.LangDefinitionProcessor' less than -source '1.8'
1 warning
See attached doc when I put this in a few years ago. Had same issue - solved by setting java path in the cmd window.
Thank ya sir! I was able to set everything up but the stp file extension...
0 [main] ERROR com.ptc.windchill.structconf.StructConfManager - Extra unrecognized arguments: "stp"
was returned... it took pdf.
I had just a space between pdf and stp.. is that syntax no good?
I forget which but requires .stp for Creo Parametric and .step for SolidWorks (or vice versa).
No matter how good the CS articles are I always find it necessary to create a complete document like that one. Wish I could sell them somehow 🙂
Thanks! it took just "pdf"... and it took just "stp" but I can't seem to get both in...
Well... almost... I was able to set the properties in wvs.properties, but no attachments showed up. And the log produced this
java.lang.ClassNotFoundException: com.ptc.wvs.util.AfterEDRloader
I've tried to run the command per your doc but I get this error still
javac: invalid flag:Files\Java\jdk1.8.0_202\lib\tools.jar;C:\ptc\Windchill_11.2\Windchill\tomcat\bin\bootstrap.jar;C:\ptc\Windchill_11.2\Windchill\tomcat\bin\tomcat-juli.jar;C:\PTC\Windchill_11.2\Windchill\srclib\tool\Annotations.jar
the wt.properties file reads this though:
wt.javac.classpath=$(wt.java.classpath)$(path.sep)$(wt.annotations.jar)
Any ideas where i've gone wrong
https://www.ptc.com/en/support/article/cs324171
This article took care of the invalid flag error....
Using -s publish.afterloadermethod.copyToEPM.Filext="pdf stp" -p worked to get both extensions in.