BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using Jbuilder

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE
View previous topic :: View next topic  
Author Message
ralph
Guest





PostPosted: Mon Mar 20, 2006 2:03 am    Post subject: Using Jbuilder Reply with quote



I am trying to make an empty project, and add files to it.
I make a project called Snippet137, and remove the src
and classes from C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\src
and C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\classes in the output
paths. Before, I would let JBuilder stick src and classes on the ends of the paths
and then I would have to move the java files into new folders.
After making the project, there is no option to add files, like there has
been when I have made projects before. I open Snippet137.java, which
is in C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\org\eclipse\swt\snippets
and try to build the project. JBuilder thinks that Snippet109.java and Snippet7.java are also in this
project. The option to remove files from the project is greyed out. How do I make a project
with no files in it, and add a file to it? It worked before when I let JBuilder stick everything in
its own folders.
But I would have to cut and paste instead of adding files because the java file it makes is in a
different location.

Thanks, Ralph
Back to top
Paul Nichols (TeamB)
Guest





PostPosted: Mon Mar 20, 2006 2:03 am    Post subject: Re: Using Jbuilder Reply with quote



ralph wrote:

Quote:
I am trying to make an empty project, and add files to it.
I make a project called Snippet137, and remove the src
and classes from C:\Documents and Settings\MDG User\My
Documents\javastuf\snippets\src and C:\Documents and Settings\MDG User\My
Documents\javastuf\snippets\classes in the output


Just make your project in the path you want it to be in. For instance, most
of my projects are in /development/dev/<typeofproject>/<projectname>.

So if I were using Windows:

C:\development\dev\mywebprograms\awebproject
src
bak
classes
<webname>
index.jsp
WEB-INF
classes
lib


This kind of structure should correct your problems
Back to top
Paul Nichols (TeamB)
Guest





PostPosted: Mon Mar 20, 2006 7:46 am    Post subject: Re: Using Jbuilder Reply with quote



ralph wrote:

Quote:

"Paul Nichols (TeamB)" <paul (AT) comp (DOT) net> wrote in message
news:441e34fd (AT) newsgroups (DOT) borland.com...
ralph wrote:

I am already making the project in
C:\Documents and Settings\MDG User\My Documents\javastuf\snippets
JBuilder puts \src and \classes on the end of that for the source and
classes output
paths. When I don't remove them, everything is ok. When I do, then the
above
problems happen. Why does JBuilder think that other java files are part
of the project before I have done anything?

See Lori's comments. BTW, it is very bad practice to use spaces in your java

classpath names. You will be sorry, if you want xplatform Smile
Back to top
ralph
Guest





PostPosted: Mon Mar 20, 2006 3:03 pm    Post subject: Re: Using Jbuilder Reply with quote

"Paul Nichols (TeamB)" <paul (AT) comp (DOT) net> wrote in message news:441e34fd (AT) newsgroups (DOT) borland.com...
Quote:
ralph wrote:

I am trying to make an empty project, and add files to it.
I make a project called Snippet137, and remove the src
and classes from C:\Documents and Settings\MDG User\My
Documents\javastuf\snippets\src and C:\Documents and Settings\MDG User\My
Documents\javastuf\snippets\classes in the output


Just make your project in the path you want it to be in. For instance, most
of my projects are in /development/dev/<typeofproject>/<projectname>.

So if I were using Windows:

C:\development\dev\mywebprograms\awebproject
src
bak
classes
webname
index.jsp
WEB-INF
classes
lib


This kind of structure should correct your problems


I am already making the project in

C:\Documents and Settings\MDG User\My Documents\javastuf\snippets
JBuilder puts \src and \classes on the end of that for the source and classes output
paths. When I don't remove them, everything is ok. When I do, then the above
problems happen. Why does JBuilder think that other java files are part of
the project before I have done anything?

Ralph
Back to top
Lori M Olson [TeamB]
Guest





PostPosted: Tue Mar 21, 2006 3:03 am    Post subject: Re: Using Jbuilder Reply with quote

ralph wrote:

Quote:
I am already making the project in
C:\Documents and Settings\MDG User\My Documents\javastuf\snippets
JBuilder puts \src and \classes on the end of that for the source and classes output
paths. When I don't remove them, everything is ok. When I do, then the above
problems happen. Why does JBuilder think that other java files are part of
the project before I have done anything?

Ralph



If you are using JBuilder, you ABSOLUTELY have to keep source and
classes in different directories. The main reason for this is that a
"clean" (part of the rebuild process) will delete everything in the
classes directory. If you source is in there too, you will be very sorry.

What "other java files" are you talking about?

--

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Back to top
Bill Joy
Guest





PostPosted: Tue Mar 21, 2006 4:03 am    Post subject: Re: Using Jbuilder Reply with quote

That is not true, the Clean process checks if source and output directories
are the same and behaves appropriately.


"Lori M Olson [TeamB]" <javadragon (AT) techie (DOT) com> wrote in message
news:441f645d$1 (AT) newsgroups (DOT) borland.com...
Quote:

If you are using JBuilder, you ABSOLUTELY have to keep source and classes
in different directories. The main reason for this is that a "clean"
(part of the rebuild process) will delete everything in the classes
directory. If you source is in there too, you will be very sorry.
Back to top
Doychin Bondzhev
Guest





PostPosted: Tue Mar 21, 2006 7:03 am    Post subject: Re: Using Jbuilder Reply with quote

I project properties there is panel where you specify which directories
contain your source files. So I think that there is no way to add only
one file to your project.

Usually java projects have their java files in a source path that is the
same like the package path in the java class. So in the project
properties you have to add the path which is considered to be the root
for java class package.

For example in your case you want to separate the java project from
source and put your sources in different location.

So you have to go to project properties and Paths paget. You will see
that there you have some settings you have to adjust in order to achive
what you are trying to do.

I hope these directions will help you.

Doychin

ralph wrote:
Quote:
I am trying to make an empty project, and add files to it.
I make a project called Snippet137, and remove the src
and classes from C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\src
and C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\classes in the output
paths. Before, I would let JBuilder stick src and classes on the ends of the paths
and then I would have to move the java files into new folders.
After making the project, there is no option to add files, like there has
been when I have made projects before. I open Snippet137.java, which
is in C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\org\eclipse\swt\snippets
and try to build the project. JBuilder thinks that Snippet109.java and Snippet7.java are also in this
project. The option to remove files from the project is greyed out. How do I make a project
with no files in it, and add a file to it? It worked before when I let JBuilder stick everything in
its own folders.
But I would have to cut and paste instead of adding files because the java file it makes is in a
different location.

Thanks, Ralph

Back to top
ralph
Guest





PostPosted: Wed Mar 22, 2006 2:03 am    Post subject: Re: Using Jbuilder Reply with quote

"Lori M Olson [TeamB]" <javadragon (AT) techie (DOT) com> wrote in message
news:441f645d$1 (AT) newsgroups (DOT) borland.com...
Quote:
ralph wrote:

I am already making the project in
C:\Documents and Settings\MDG User\My Documents\javastuf\snippets
JBuilder puts \src and \classes on the end of that for the source and classes output
paths. When I don't remove them, everything is ok. When I do, then the above
problems happen. Why does JBuilder think that other java files are part of
the project before I have done anything?

Ralph



If you are using JBuilder, you ABSOLUTELY have to keep source and classes in different directories.
The main reason for this is that a "clean" (part of the rebuild process) will delete everything in
the classes directory. If you source is in there too, you will be very sorry.

What "other java files" are you talking about?

--

Regards,

Lori Olson [TeamB]

Actually, I made a mistake, it was /src and /test that I was removing, I left the /classes on.
Why does JBuilder think that other java files in
C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\org\eclipse\swt\snippets
are part of the project. Is it actually building some other projects I have that have these files in
them?
So, how do I use java files I already have without letting JBuilder make a new file in
....\src\org\eclipse\swt\snippets,
then opening the old Java file from \org\eclipse\swt\snippets in Wordpad, then copy and paste into the
new java file?
In Kawa, you just make a project at the top of the package directory structure, then add the file. No
pasting required.

Ralph
Quote:
------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Back to top
ralph
Guest





PostPosted: Wed Mar 22, 2006 2:03 am    Post subject: Re: Using Jbuilder Reply with quote

Just looked at snippet137.jpx.local and it has only Snippet137.java in it, so why does it detect the
error in
Snippet109.java?

"ralph" <vralphv (AT) yahooTHIS (DOT) com> wrote in message news:4420a877$1 (AT) newsgroups (DOT) borland.com...
Quote:
I did an experiment. First, I looked at the .jpx file, no mention there of which files are
part of the project. Then, before rebuilding a project I thought had only Snippet137.java in it, I
introduced an error into Snippet109.java, which was also in the same folder.
src\org\eclipse\swt\snippets.
I got an error. So you have to separate all your files from each other. In
Kawa, you dont have to do this.

Ralph

"Doychin Bondzhev" <doychin@dsoft-bg.com> wrote in message news:441fa140$1 (AT) newsgroups (DOT) borland.com...
I project properties there is panel where you specify which directories contain your source files. So
I think that there is no way to add only one file to your project.

Usually java projects have their java files in a source path that is the same like the package path
in the java class. So in the project properties you have to add the path which is considered to be
the root for java class package.

For example in your case you want to separate the java project from source and put your sources in
different location.

So you have to go to project properties and Paths paget. You will see that there you have some
settings you have to adjust in order to achive what you are trying to do.

I hope these directions will help you.

Doychin

ralph wrote:
I am trying to make an empty project, and add files to it.
I make a project called Snippet137, and remove the src
and classes from C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\src
and C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\classes in the output
paths. Before, I would let JBuilder stick src and classes on the ends of the paths
and then I would have to move the java files into new folders.
After making the project, there is no option to add files, like there has
been when I have made projects before. I open Snippet137.java, which
is in C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\org\eclipse\swt\snippets
and try to build the project. JBuilder thinks that Snippet109.java and Snippet7.java are also in
this
project. The option to remove files from the project is greyed out. How do I make a project
with no files in it, and add a file to it? It worked before when I let JBuilder stick everything
in its own folders.
But I would have to cut and paste instead of adding files because the java file it makes is in a
different location.

Thanks, Ralph

Back to top
ralph
Guest





PostPosted: Wed Mar 22, 2006 2:03 am    Post subject: Re: Using Jbuilder Reply with quote

I did an experiment. First, I looked at the .jpx file, no mention there of which files are
part of the project. Then, before rebuilding a project I thought had only Snippet137.java in it, I
introduced an error into Snippet109.java, which was also in the same folder.
src\org\eclipse\swt\snippets.
I got an error. So you have to separate all your files from each other. In
Kawa, you dont have to do this.

Ralph

"Doychin Bondzhev" <doychin@dsoft-bg.com> wrote in message news:441fa140$1 (AT) newsgroups (DOT) borland.com...
Quote:
I project properties there is panel where you specify which directories contain your source files. So
I think that there is no way to add only one file to your project.

Usually java projects have their java files in a source path that is the same like the package path
in the java class. So in the project properties you have to add the path which is considered to be
the root for java class package.

For example in your case you want to separate the java project from source and put your sources in
different location.

So you have to go to project properties and Paths paget. You will see that there you have some
settings you have to adjust in order to achive what you are trying to do.

I hope these directions will help you.

Doychin

ralph wrote:
I am trying to make an empty project, and add files to it.
I make a project called Snippet137, and remove the src
and classes from C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\src
and C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\classes in the output
paths. Before, I would let JBuilder stick src and classes on the ends of the paths
and then I would have to move the java files into new folders.
After making the project, there is no option to add files, like there has
been when I have made projects before. I open Snippet137.java, which
is in C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\org\eclipse\swt\snippets
and try to build the project. JBuilder thinks that Snippet109.java and Snippet7.java are also in
this
project. The option to remove files from the project is greyed out. How do I make a project
with no files in it, and add a file to it? It worked before when I let JBuilder stick everything in
its own folders.
But I would have to cut and paste instead of adding files because the java file it makes is in a
different location.

Thanks, Ralph
Back to top
Lori M Olson [TeamB]
Guest





PostPosted: Wed Mar 22, 2006 5:03 am    Post subject: Re: Using Jbuilder Reply with quote

ralph wrote:
Quote:
Just looked at snippet137.jpx.local and it has only Snippet137.java in it, so why does it detect the
error in
Snippet109.java?


It is called Automatic Source Discovery (ASD). It is a project
property. Turn it off if you want to.

--

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Back to top
Paul Furbacher [TeamB]
Guest





PostPosted: Wed Mar 22, 2006 7:03 am    Post subject: Re: Using Jbuilder Reply with quote

ralph wrote:

Quote:
[...]
So, how do I use java files I already have without letting JBuilder make a new file in
...\src\org\eclipse\swt\snippets,
then opening the old Java file from \org\eclipse\swt\snippets in Wordpad, then copy and paste into the
new java file?
In Kawa, you just make a project at the top of the package directory structure, then add the file. No
pasting required.

Hate to ask this, but have you read the built-in JBuilder Help on
project management?

It would be a good idea to do that before proceeding much further.

Simply put, all IDEs have a sense of a project directory and
source directories. Eclipse is no different from JBuilder is
not really different from NetBeans, and so on.

In JBuilder (see the documentation and numerous discussions in
the archives of these newsgroups), the typical structure is

d:/<path-to-project-dir>/project_dir
/bak
/classes
/doc
/src
/test
....

Now, it seems as though you have somehow inherited an example,
or started editing a set of Java files in some other environment.
That's all well and good. However, if you are going to use
JBuilder, you should a) read the manual and b) follow the
directory structure it advises you to use.

Could you possibly try the following?

1. create a new project in

c:/projects/java/snippets

(By default, JBuilder will expect your Java source files
to be in c:/projects/java/snippets/src. You don't have
to do anything with regard to telling JBuilder that. Just
accept the defaults it gives you once you define the
new project's root directory.)

2. using your file system browser (that is, "Explorer" on
Windows, "Finder" on OS X, and who knows what on Linux),
create a "src" folder in

c:/projects/java/snippets

so that you have

c:/projects/java/snippets/src

(Normally, JBuilder will make this directory and any
other resource directory in a "lazy" fashion. That is,
these directories -- /bak, /doc, /classes, /src and /test --
are only created when JBuilder creates something to put into them.
E.g., the /src dir will only be made when you use a "New Java
class" Wizard to create a new class; /bak will only be created
when you make changes to your Java source code and save those changes.
Since you have not yet made a new Java source code file,
the /src folder has not been made. Proceed.)

3. still using the file system browser of your OS, move your existing
SnippetXXX.java files currently in

C:\Documents and Settings\MDG User\My Documents\javastuf\snippets

to

c:/projects/java/snippets/src


Java has a clear definition of packages. It has a clear notion
that packages coincide with file system or logical (e.g., in JAR
file) directories.

It would seem that given your quoted directory paths

org\eclipse\swt\snippets

that you have indeed specified a package

package org.eclipse.swt.snippets;

in your SnippetXXX.java files.

If that's the case, amend the path in step 3: move those
SnippetXXX.java files to

c:/projects/java/snippets/src/org/eclipse/swt/snippets


As others have noted in this thread, if you have any Java
source files on the source path, JBuilder will compile them.
That's what is meant by "project". If those other files
aren't meant to be compiled, either move them to a separate
project, or move them via refactoring to another package,
right-click on that new package node in the Project Pane and
select "Apply Filter... > Exclude Package". (I'd refrain
from regularly using the latter technique.)

But, before proceeding, read up on Java packages (Google
is your friend as are good books on core Java concepts),
and be sure to read the JBuilder Help manual on creating
projects.


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Back to top
ralph
Guest





PostPosted: Fri Mar 24, 2006 2:03 am    Post subject: Re: Using Jbuilder Reply with quote

"Lori M Olson [TeamB]" <javadragon (AT) techie (DOT) com> wrote in message news:4420cebc (AT) newsgroups (DOT) borland.com...
Quote:
ralph wrote:
Just looked at snippet137.jpx.local and it has only Snippet137.java in it, so why does it detect the
error in
Snippet109.java?


It is called Automatic Source Discovery (ASD). It is a project property. Turn it off if you want
to.

This sounded like a good idea. I turned it off and then tried to make
a project with Snippet14.java in it
Snippet14.java is in
C:\Documents and Settings\MDG User\My Documents\javastuf\snippets\org\eclipse\swt\snippets\
I removed the src from the source output path that JBuilder wanted to make. The Help on projects
implies that you can change things like that.

I got

"Snippet109.java": Package
C:\Documents and Settings\MDG User\My
Documents\javastuf\snippets\src\org\eclipse\swt\snippets\Snippet109.java stated in source
org.eclipse.swt.snippets does not match directory
C:\Documents and Settings\MDG User\My
Documents\javastuf\snippets\src\org\eclipse\swt\snippets\Snippet109.java. at line 11, column 25

"Snippet109.java": Duplicate definition of class org.eclipse.swt.snippets.Snippet109, defined in
C:\Documents and Settings\MDG User\My
Documents\javastuf\snippets\org\eclipse\swt\snippets\Snippet109.java and also defined in C:\Documents
and Settings\MDG User\My Documents\javastuf\snippets\src\org\eclipse\swt\snippets\Snippet109.java.

So it is still discovering the other Snippets.
I think I will just make one project, allow JBuilder to stick 'src' in the path, then move a large
number of
snippets into the folder

Ralph
Quote:

--

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Back to top
ralph
Guest





PostPosted: Fri Mar 24, 2006 2:03 am    Post subject: Re: Using Jbuilder Reply with quote

Quote:
So it is still discovering the other Snippets.
I think I will just make one project, allow JBuilder to stick 'src' in the path, then move a large
number of
snippets into the folder

Didn't even do that. I just opened a previous project, opened any snippet file, made
the snippet, then ran it, no problems
The project has all the snippets in it.

Ralph
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.