stand alone java class and the class path [message #507179] |
Tue, 12 January 2010 01:43  |
Eclipse User |
|
|
|
Hi,
I have a simple Java project in Eclipse environment. The project has it's class path,
that contains a jar file that I need to use.
The project runs perfect in the Eclipse.
Now, I need to take the main class out of my project, to function alone in another environment.
My problem is that out of the environment, I don't know how the class should know that classpath.
I moved that jar to the same folder that the class located in, but I don't know how to tell it that the jar is there.
My goal is to run my standalone class from another java class.
I'm afraid that examples in command environment wouldn't help me.
Thanks a lot for any help !
|
|
|
Re: stand alone java class and the class path [message #507225 is a reply to message #507179] |
Tue, 12 January 2010 09:41  |
Eclipse User |
|
|
|
Your class should be able to find material from the jar file if that jar
file is also on the class path. One way to do so is to add it to the
-classpath parameter when invoking java.
Cheers,
Steffen
On 12/01/2010 06:43, moshi wrote:
> Hi,
> I have a simple Java project in Eclipse environment. The project has
> it's class path,
> that contains a jar file that I need to use.
> The project runs perfect in the Eclipse.
> Now, I need to take the main class out of my project, to function
> alone in another environment.
> My problem is that out of the environment, I don't know how the class
> should know that classpath.
> I moved that jar to the same folder that the class located in, but I
> don't know how to tell it that the jar is there.
> My goal is to run my standalone class from another java class. I'm
> afraid that examples in command environment wouldn't help me.
>
> Thanks a lot for any help !
|
|
|
Re: stand alone java class and the class path [message #507228 is a reply to message #507225] |
Tue, 12 January 2010 04:57  |
Eclipse User |
|
|
|
Hi ,
I found the solution of what I was looking for.
I want to write it down for the other people who will face with it in the future.
So it's very simple - in the app.config file in your .net project you
have entries to describe the class path. There you can insert anything
you want to be inside the class path.
Thanks for those who tried to help.
|
|
|
Powered by
FUDForum. Page generated in 0.03530 seconds