|
|
Welcome to the Java Forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
- have access to post topics
- communicate privately with other members (PM)
- not see advertisements between posts
- have the possibility to earn one of our surprises if you are an active member
- access many other special features that will be introduced later.
Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.
|
|

03-22-2008, 07:05 AM
|
 |
Member
|
|
Join Date: Mar 2008
Location: beijing,China
Posts: 5
|
|
|
How can I change a project's build directory?
My English is poor,I will try my best to give a accurate description of this question!
OS:Linux AS 4
IDE: netbeans 5.5
project folder : /javawork/webapp1
build folder: /javawork/webapp1/build/
I don't like build in build folder.How can I change build folder into project folder?
"/javawork/webapp1/build/web ----> /javawork/webapp1/"
Thank you very much!
__________________
one for all,all for one!
|
|

03-24-2008, 03:05 AM
|
 |
Member
|
|
Join Date: Mar 2008
Location: beijing,China
Posts: 5
|
|
|
nobody tell me!
__________________
one for all,all for one!
|
|

03-25-2008, 11:49 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,583
|
|
|
I can't find such a setting can be change. An why don't you worried about the class files in build folder. In most of the cases you can use the project jar file in the dist folder.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

03-26-2008, 03:14 AM
|
 |
Member
|
|
Join Date: Mar 2008
Location: beijing,China
Posts: 5
|
|
|
Thanks for Eranga's answer!
In my project there is an XML file in web/web-inf/.It contains this website name,database server's ip,database's account and password!
Example:
<root>
<appName>desinged by sylvester</appName>
<appUrl>http://localhost:8080/sylv/</appUrl>
<appServerPath>file:///javawork/myWeb1/build/web/</appServerPath>
<appUploadFilePath>file:///javawork/myWeb1/build/web/upfile/</appUploadFilePath>
<appPageSize>20</appPageSize>
<appDbConf>
<dbHost>127.0.0.1</dbHost>
<dbPort>3306</dbPort>
<dbName>myapp</dbName>
<dbUser>sylvester</dbUser>
<dbPwd>sylv</dbPwd>
</appDbConf>
</root>
I desined a class can get these parameters from this xml,and the class can update this xml file. So I need to know this file's absolute path in disk.When construct the class which can update xmlfile,I use "this.getClass().getResource()" get the path.So,the classs in build folder and the class src folder will get two different paths.It's a difficulty when I debug my project!
That is all my mind!
Maybe my mind is wrong?
By the way ,can I add your name in buddy list??
__________________
one for all,all for one!
Last edited by sylvpan : 03-26-2008 at 03:21 AM.
Reason: there some syntax error
|
|

03-26-2008, 03:22 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,583
|
|
Why you need the class path for this. Wherever the class is, only you need the correct path of XML file. If I got your requirement correctly, just you want to read a XML file and update a XML file. Isn't it?
Originally Posted by sylvpan
By the way ,can I add your name in buddy list??
It's up to you. But one day I'm in your ignore list
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

03-27-2008, 03:06 AM
|
 |
Member
|
|
Join Date: Mar 2008
Location: beijing,China
Posts: 5
|
|
|
[quote=Eranga;15439] If I got your requirement correctly, just you want to read a XML file and update a XML file. Isn't it?[/QUOTE=Eranga;15439]
yes,you're right!I handled the problem.I think my desinged before is wrong!
__________________
one for all,all for one!
Last edited by sylvpan : 03-27-2008 at 03:14 AM.
Reason: wrong pattern
|
|

03-27-2008, 03:42 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,583
|
|
|
Nice to here that pal. So now you no need to change the build folder path, right?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-06-2008, 02:20 PM
|
|
Member
|
|
Join Date: Jun 2008
Posts: 41
|
|
|
Hi, this is quite easy to fix!! I will try to explain as simply as I can:
1) In netbeans press Ctrl-2 to bring up the files window;
2) Expand the project you are interested in and open the folder "nbproject";
3) Double click the file "project.properties";
4) Edit this value: build.dir=c:/webapps/MyProject/WEB-INF (Obviously put the location you want your class files to go to!).
And thats it, simple, I hope this helps you.
|
|

06-09-2008, 09:37 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,583
|
|
|
Ya, quite simple way. But I don't think it's good idea to deal with such files, since have a good idea on them. Anyway, nice tip.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-09-2008, 12:06 PM
|
|
Member
|
|
Join Date: Jun 2008
Posts: 41
|
|
|
What do you mean? Not deal with such files? This xml file is your project properties file and it there for you to change, otherwise your classes will always build into the default directory.
Quite often than is not what you want, especially if you are running a web app under tomcat for instance.
|
|

06-09-2008, 12:54 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,583
|
|
|
No, what I'm try to say, that is not a good idea to change default values on the properties file if you know what exactly doing. Lots of people are really newbie for NetBeans. Even on Java(even not affected to this.)
I think it's clear now what I try to say.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|