Board index » jbuilder » [JBX][JDK] setJDKPathSet(myjdk) problem.

[JBX][JDK] setJDKPathSet(myjdk) problem.


2004-07-15 06:32:09 PM
jbuilder13
Hi, I try to link my opentool project with my own JDK when I create it but
it doesn't work very well.
If the jdk is already created , there's no problem. But if I delete it and
after i create my new project, the jdk is well created by the line
"jbProject.getPaths().setJDKPathSet(myjdk)" (I can see it in the jdk
configuration of the "tools" tab) but my project jdk is the default jdk not
my jdk.
I try a lot of stuff :
jbProject.getPaths().getJDKPathSet().addEntries(Urlofmyjdk) for example. But
each time, the link between my jdk and my project is not done if I create
the jdk just before.
Thanks a lot.
Best regards.
--
_________________________________________
David Emo
Chef de Projet Penbase Visual Designer
XXXX@XXXXX.COM
m-Penbase S.A.
www.penbase.com
TEL : + 33(0)467 593 027
FAX : + 33(0)467 593 031
__________________________________________
 
 

Re:[JBX][JDK] setJDKPathSet(myjdk) problem.

Not sure of the details of what you are doing.
To create a .library for a JDK:
Url url = <jdk root directory>;
JDKPathSet ps = new JDKPathSet(url);
ps.save();
PathSetManager.save();
To find that JDK later by name:
String name = <name of the library>;
JDKPathSet ps = PathSetManager.getJDK(ps);
if (!ps.getName().equals(name)) {
// my library is not defined
}
To change the JDK definition for a project;
JBProject project = <a JBuilder project>;
JDKPathSet ps = <a JDK pathset>;
project.getPaths().setJDKPathSet(ps);
"david emo" < XXXX@XXXXX.COM >wrote in message
Quote
Hi, I try to link my opentool project with my own JDK when I create it but
it doesn't work very well.
If the jdk is already created , there's no problem. But if I delete it
and
after i create my new project, the jdk is well created by the line
"jbProject.getPaths().setJDKPathSet(myjdk)" (I can see it in the jdk
configuration of the "tools" tab) but my project jdk is the default jdk
not
my jdk.
I try a lot of stuff :
jbProject.getPaths().getJDKPathSet().addEntries(Urlofmyjdk) for example.
But
each time, the link between my jdk and my project is not done if I create
the jdk just before.

Thanks a lot.
Best regards.

--
_________________________________________
David Emo
Chef de Projet Penbase Visual Designer
XXXX@XXXXX.COM

m-Penbase S.A.
www.penbase.com

TEL : + 33(0)467 593 027
FAX : + 33(0)467 593 031
__________________________________________