Skip to main content
1-Visitor
August 10, 2015
Solved

compiling java file in windchill shell won't take effect

  • August 10, 2015
  • 3 replies
  • 9983 views


As title, I typed a command like "javac xyz.java" in winchill shell, it showed no error,

the technical staff in retailer told me I should typed "windchill stop && windchill start" after that,

then the compiling took effect.

It really worked, but I could not do this in Office Hour, so please supplied me other ways to take effect immediately.

Best answer by BobLehman2

Andy,

The other comment I can make on this, is why is there a restart restriction? Are you developing directly on a production box?  Normally you would want a couple of Windchill environments available - test/dev, integration, production at a minimum.  If you had a dev box to work with the running of Windchill in debug.  I know this may sound obvious to most of the people in the group, but I am constantly amazed at how many customer do not have good setups for on going support of the deployment.

--Bob

3 replies

15-Moonstone
August 10, 2015

Andy,

The compiling actually does take effect right away.  The problem is that Windchill caches the executed code.  So the Windchill restart (and probably clearing caches) is a necessary step for newly-compiled code to execute.

You can test this.  For example, do a restart first, and execute javac before the code is executed.  You'll see the changes take effect immediately.  So the root of the problem is the cached executed code.

ahsieh1-VisitorAuthor
1-Visitor
August 11, 2015

Ben,

Thank you for your  prompt reply. Is there any way to clear caches instead of restarting ?


1-Visitor
August 10, 2015

You can set Windchill in debug mode with eclipse, so you don’t need to restart Windchill every time after code change . However setting Windchill in debug mode is not useful/ recommended  for production environment.

You can configure eclipse with Windchill for development and file sync plugin. see below link for more details about configuring eclipse with Windchill 

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS63697&art_lang=en&posno=2&q=eclipse_project&source=search

Hope it helps !!

Thanks

Shreyas

12-Amethyst
August 10, 2015

You could also use JRebel.  We use this on our sandboxes and one development box.  This will automatically redeploy new class files, and along with Tomcat in developer mode does most of what is necessary.  The only gotcha is to exclude PTC code from being reloaded by JRebel (done via an xconf setting).

12-Amethyst
August 10, 2015

Andy,

The other comment I can make on this, is why is there a restart restriction? Are you developing directly on a production box?  Normally you would want a couple of Windchill environments available - test/dev, integration, production at a minimum.  If you had a dev box to work with the running of Windchill in debug.  I know this may sound obvious to most of the people in the group, but I am constantly amazed at how many customer do not have good setups for on going support of the deployment.

--Bob

ahsieh1-VisitorAuthor
1-Visitor
August 11, 2015

Bob,

Sorry, I'm not familiar with IT system construction, there are many concepts I must learn. Dose it work without restart windchill If I compile the java file into class file first in test/dev box, then copy class file to producntion box ?

ahsieh1-VisitorAuthor
1-Visitor
August 12, 2015

Chris,

Thank you for your explanation.  If it's necessary to restart production box, I was wondering to know the exact steps for making recompile java file become effective.

1. modify java file in development box and restart the box.

2. test the function, if it has bug, repeat first step.

3. copy class file to production box and restart the box at Non Office Hour.

Is above steps correct ?