In part 1, I discussed the client side code and gave examples of how to use JSON in a web page using JavaScript. Part 2 discusses the server side code and gives an example of Continue reading
Category Archives: Java
Controlling the CADWorker’s Appetite
By default the Windchill CAD worker will attempt to publish all EPMDocuments regardless of whether the EPMDocument is a part, drawing, manufacturing assembly, skeleton, etc.
Due to the extensible nature of Windchill, you can control Continue reading
Creating a zip file in Java using the Zip4j library
This morning brought a new challenge — creating a compressed zip file of a directory from within an existing Java program for archival purposes.
Rather than installing a 3rd party program like 7Zip, this code needed to be Continue reading
How to reduce NullPointerExceptions
This is a coding technique that can help reduce the number of NullPointerExceptions that you need to deal with without resorting to checking for null Strings every time you compare literal values.
This is the way we’re taught to Continue reading
Passing data between a JSP page and servlet using JSON and JQuery (part 1)
JavaScript Object Notation, or JSON for short, is a human-readable and compact way to exchange data between systems. JSON has been referred to as a fat-free alternative to XML.
There are lots of websites that explain the pros and cons to using XML vs. JSON so I won’t go into that here. Rather, I’ll give a brief but complete example of how to Continue reading
Using InfoReport to learn about Windchill objects
PTC includes a useful shell script in the Windchill/bin folder named InfoReport.sh (Unix) or InfoReport.bat (Windows) that can be used to learn about the internal fields and methods of various Windchill objects.
The script uses introspection to interrogate a Java class and create a text file report containing Continue reading