 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
dingfelder Guest
|
Posted: Mon Jan 22, 2007 6:06 am Post subject: 2007 build woes |
|
|
I am using v2007 and am struggling to get basic builds working.
I configured my libraries to work and can generare a jar file manually for my project.
The only way I can get the project to "run" though is to set up the jar and add my own genmerated jar as a required library for the project and then rebuild the jar before doing a run.
If I do not haver the jar file, I get a class can not be found error.
My assumption is that the run process should run on the class file in the output directory so it should not require the jar.
Thoughts? |
|
| Back to top |
|
 |
Bill Joy Guest
|
Posted: Mon Jan 22, 2007 8:26 pm Post subject: Re: 2007 build woes |
|
|
Is that error really what you are getting? You should be getting an error
about a build not being able to be initiated until a problem is fixed.
With the Eclipse build system, everything on the project classpath has to
exist before a build will be performed. Every jar must exist, every
directory must exist. (You also cannot have the same jar being referenced
twice on the project classpath.)
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b3fff8$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
I am using v2007 and am struggling to get basic builds working.
I configured my libraries to work and can generare a jar file manually for
my project.
The only way I can get the project to "run" though is to set up the jar
and add my own genmerated jar as a required library for the project and
then rebuild the jar before doing a run.
If I do not haver the jar file, I get a class can not be found error.
My assumption is that the run process should run on the class file in the
output directory so it should not require the jar.
Thoughts? |
|
|
| Back to top |
|
 |
dingfelder Guest
|
Posted: Tue Jan 23, 2007 2:27 am Post subject: Re: 2007 build woes |
|
|
Hi Bill,
Maybe I'm not explaining my situation correctly.
it is not in the build step, but in the run step.
I am trying to run from the working directory of ${workspace_loc:my_project/classes}
If I include my own jar file in the classpath, it runs fine.
If I remove my jar from the classpath, I get a
java.lang.NoClassDefFoundError (Exception in thread "main") for my class that I need to launch.
It is my assumption that I sould not need my jar, it should run from the classes area right?
Cheers,
Andy
"Bill Joy" <wcjoy (AT) pacbell (DOT) net> wrote:
| Quote: | Is that error really what you are getting? You should be getting an error
about a build not being able to be initiated until a problem is fixed.
With the Eclipse build system, everything on the project classpath has to
exist before a build will be performed. Every jar must exist, every
directory must exist. (You also cannot have the same jar being referenced
twice on the project classpath.)
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b3fff8$1 (AT) newsgroups (DOT) borland.com...
I am using v2007 and am struggling to get basic builds working.
I configured my libraries to work and can generare a jar file manually for
my project.
The only way I can get the project to "run" though is to set up the jar
and add my own genmerated jar as a required library for the project and
then rebuild the jar before doing a run.
If I do not haver the jar file, I get a class can not be found error.
My assumption is that the run process should run on the class file in the
output directory so it should not require the jar.
Thoughts?
|
|
|
| Back to top |
|
 |
Bill Joy Guest
|
Posted: Tue Jan 23, 2007 3:28 am Post subject: Re: 2007 build woes |
|
|
Yes, you should be able to run from just the class files created during a
project build.
Are you creating a Run/Debug configuration for a Java Application and is the
Search button seeing your main class?
You should also be able to right-click on your main class in the Package
Explorer and use the Run As or Debug As menu.
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b51e2e$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
Hi Bill,
Maybe I'm not explaining my situation correctly.
it is not in the build step, but in the run step.
I am trying to run from the working directory of
${workspace_loc:my_project/classes}
If I include my own jar file in the classpath, it runs fine.
If I remove my jar from the classpath, I get a
java.lang.NoClassDefFoundError (Exception in thread "main") for my class
that I need to launch.
It is my assumption that I sould not need my jar, it should run from the
classes area right?
Cheers,
Andy
"Bill Joy" <wcjoy (AT) pacbell (DOT) net> wrote:
Is that error really what you are getting? You should be getting an error
about a build not being able to be initiated until a problem is fixed.
With the Eclipse build system, everything on the project classpath has to
exist before a build will be performed. Every jar must exist, every
directory must exist. (You also cannot have the same jar being referenced
twice on the project classpath.)
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b3fff8$1 (AT) newsgroups (DOT) borland.com...
I am using v2007 and am struggling to get basic builds working.
I configured my libraries to work and can generare a jar file manually
for
my project.
The only way I can get the project to "run" though is to set up the jar
and add my own genmerated jar as a required library for the project and
then rebuild the jar before doing a run.
If I do not haver the jar file, I get a class can not be found error.
My assumption is that the run process should run on the class file in
the
output directory so it should not require the jar.
Thoughts?
|
|
|
| Back to top |
|
 |
dingfelder Guest
|
Posted: Tue Jan 23, 2007 5:27 am Post subject: Re: 2007 build woes |
|
|
Not sure about the Run/Debug part...
I created the run action but selecting "run..." menu item from the run menu.
then I defined the following:
main --> set main class and project name
args --> set the working dir to my classes dir
jre --> changed nothing
classpath --> added my required libraries
source --> set the source to my src dir
env --> changed nothing
common --> changed nothing
If the classpath has the assembled jar (i.e. the output of this project) it works
If the classpath does not have the jar, it gives a NoClassDefFoundError error
"selecing run as application" when right clicking the launch class in the explorer gives the same result as the run menu, it succeeds with the jar and fails without it.
Thoughts?
Cheers,
Andy
"Bill Joy" <wcjoy (AT) pacbell (DOT) net> wrote:
| Quote: | Yes, you should be able to run from just the class files created during a
project build.
Are you creating a Run/Debug configuration for a Java Application and is the
Search button seeing your main class?
You should also be able to right-click on your main class in the Package
Explorer and use the Run As or Debug As menu.
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b51e2e$1 (AT) newsgroups (DOT) borland.com...
Hi Bill,
Maybe I'm not explaining my situation correctly.
it is not in the build step, but in the run step.
I am trying to run from the working directory of
${workspace_loc:my_project/classes}
If I include my own jar file in the classpath, it runs fine.
If I remove my jar from the classpath, I get a
java.lang.NoClassDefFoundError (Exception in thread "main") for my class
that I need to launch.
It is my assumption that I sould not need my jar, it should run from the
classes area right?
Cheers,
Andy
"Bill Joy" <wcjoy (AT) pacbell (DOT) net> wrote:
Is that error really what you are getting? You should be getting an error
about a build not being able to be initiated until a problem is fixed.
With the Eclipse build system, everything on the project classpath has to
exist before a build will be performed. Every jar must exist, every
directory must exist. (You also cannot have the same jar being referenced
twice on the project classpath.)
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b3fff8$1 (AT) newsgroups (DOT) borland.com...
I am using v2007 and am struggling to get basic builds working.
I configured my libraries to work and can generare a jar file manually
for
my project.
The only way I can get the project to "run" though is to set up the jar
and add my own genmerated jar as a required library for the project and
then rebuild the jar before doing a run.
If I do not haver the jar file, I get a class can not be found error.
My assumption is that the run process should run on the class file in
the
output directory so it should not require the jar.
Thoughts?
|
|
|
| Back to top |
|
 |
Bill Joy Guest
|
Posted: Tue Jan 23, 2007 6:09 am Post subject: Re: 2007 build woes |
|
|
I would have to guess that you are not setting up the classpath correctly.
Not sure why you are modifying it -- I have never had to change the defaults
for the classpath or source in a run configuration.
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b54877$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
Not sure about the Run/Debug part...
I created the run action but selecting "run..." menu item from the run
menu.
then I defined the following:
main --> set main class and project name
args --> set the working dir to my classes dir
jre --> changed nothing
classpath --> added my required libraries
source --> set the source to my src dir
env --> changed nothing
common --> changed nothing
If the classpath has the assembled jar (i.e. the output of this project)
it works
If the classpath does not have the jar, it gives a NoClassDefFoundError
error
"selecing run as application" when right clicking the launch class in the
explorer gives the same result as the run menu, it succeeds with the jar
and fails without it.
Thoughts?
Cheers,
Andy
"Bill Joy" <wcjoy (AT) pacbell (DOT) net> wrote:
Yes, you should be able to run from just the class files created during a
project build.
Are you creating a Run/Debug configuration for a Java Application and is
the
Search button seeing your main class?
You should also be able to right-click on your main class in the Package
Explorer and use the Run As or Debug As menu.
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b51e2e$1 (AT) newsgroups (DOT) borland.com...
Hi Bill,
Maybe I'm not explaining my situation correctly.
it is not in the build step, but in the run step.
I am trying to run from the working directory of
${workspace_loc:my_project/classes}
If I include my own jar file in the classpath, it runs fine.
If I remove my jar from the classpath, I get a
java.lang.NoClassDefFoundError (Exception in thread "main") for my class
that I need to launch.
It is my assumption that I sould not need my jar, it should run from the
classes area right?
Cheers,
Andy
"Bill Joy" <wcjoy (AT) pacbell (DOT) net> wrote:
Is that error really what you are getting? You should be getting an
error
about a build not being able to be initiated until a problem is fixed.
With the Eclipse build system, everything on the project classpath has
to
exist before a build will be performed. Every jar must exist, every
directory must exist. (You also cannot have the same jar being
referenced
twice on the project classpath.)
"dingfelder" <dingfeldera_nospam (AT) sirtrack (DOT) com> wrote in message
news:45b3fff8$1 (AT) newsgroups (DOT) borland.com...
I am using v2007 and am struggling to get basic builds working.
I configured my libraries to work and can generare a jar file manually
for
my project.
The only way I can get the project to "run" though is to set up the
jar
and add my own genmerated jar as a required library for the project
and
then rebuild the jar before doing a run.
If I do not haver the jar file, I get a class can not be found error.
My assumption is that the run process should run on the class file in
the
output directory so it should not require the jar.
Thoughts?
|
|
|
| Back to top |
|
 |
|
|
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
|
|