cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Getting Windchill jar files in NetBeans

BernardWielfaer
6-Contributor

Getting Windchill jar files in NetBeans

Hi,


I like to write a .class file that I can execute (as an expression) in the workflow.
I am using NetBeans to write the java class.
I need to import the wt.method.RemoteMethodServer class but can't find the jar lib file containing this.
Does Windchill out of the box commes with all librairies or must I get it from somewhere else ?


Best regards,
Bernard

3 REPLIES 3

Hi Bernard,


everythng you need come's with windchill installation. You should try application like Java Class Finder it will make programming easier. wt.method.RemoteMethodServer can be found in:


No.1
In file: C:\ptc\Windchill_9.1\Windchill\codebase\contentFCS.jar
Class name: wt/method/RemoteMethodServer.class

No.2
In file: C:\ptc\Windchill_9.1\Windchill\codebase\ptcCoreFCS.jar
Class name: wt/method/RemoteMethodServer.class

No.3
In file: C:\ptc\Windchill_9.1\Windchill\codebase\wt\method\RemoteMethodServer.class
Class name: C:\ptc\Windchill_9.1\Windchill\codebase\wt\method\RemoteMethodServer.class

No.4
In file: C:\ptc\Windchill_9.1\Windchill\codebase\wtBootInstFCS.jar
Class name: wt/method/RemoteMethodServer.class

No.5
In file: C:\ptc\Windchill_9.1\Windchill\codebase\wtMemMonitor.jar
Class name: wt/method/RemoteMethodServer.class


No.6
In file: C:\ptc\Windchill_9.1\Windchill\srclib\wnc\Foundation.jar
Class name: wt/method/RemoteMethodServer.class


Best regards,


Nenad



In Reply to Bernard Wielfaert:



Hi,


I like to write a .class file that I can execute (as an expression) in the workflow.
I am using NetBeans to write the java class.
I need to import the wt.method.RemoteMethodServer class but can't find the jar lib file containing this.
Does Windchill out of the box commes with all librairies or must I get it from somewhere else ?


Best regards,
Bernard


jessh
5-Regular Member
(To:BernardWielfaer)

There are 2 basic strategies for this:

1. Include WT_HOME/codebase, WT_HOME/codebase/WEB-INF/lib and
WT_HOME/lib in your IDE project's classpath.
* This is the server-side classpath (in that order) for Windchill,
so this allows your code to use anything in the server-side
classpath (and nothing more).
2. Include select jars from WT_HOME/srclib.
* This requires that you figure out which jars to include for what
you need to do, which can be annoying.
* The only benefit here is that the IDE has a smaller classpath to
scan. It will also keep you from referencing anything outside
these select jars -- which is good and bad, depending on whether
you're trying to limit the breadth of Windchill API usage.

Generally I'd not see enough benefit to #2 and would just go with #1.

Of course that's for server-side code. If you're doing an applet, then
things are quite a bit different (i.e. only WT_HOME/codebase plus select
jars from WT_HOME/codebase/lib).

--
Jess Holler

jessh
5-Regular Member
(To:BernardWielfaer)

As alluded to by another post, for applets you might want to reference
codebase/*.jar rather than codebase in an applet IDE project classpath.
Certainly at runtime you'd want to make use of such jars (and create
your own for your project's resulting classes) rather than pulling down
individual classes. Also, you may need to include
codebase/wt/security/security.jar as well.

Announcements

Top Tags