How 2 develop a plugin that runs a java application [message #285714] |
Tue, 24 May 2005 07:43  |
Eclipse User |
|
|
|
Originally posted by: bhbh.iyy.com
Hi, I need to develop a plugin that runs a java application.
The application is written in java, contains a main method and it's fully
working.
But the plugin shouldn't contain any graphic element: no views, no editors,
just the application.
The problem is: when I insert the class of my application inside the plugin
and I try it on the runtime workbench it doesn't start of course, and I
don't know how to activate it (I mean: if I have to activate a view I open
it, but if there is no graphical element involved what should I do?)
Thanks,
Larissa
|
|
|
|
|
|
|
Re: How 2 develop a plugin that runs a java application [message #285765 is a reply to message #285762] |
Wed, 25 May 2005 09:23   |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
Barli wrote:
> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> ha scritto nel
> messaggio news:d6vmo1$a07$1@news.eclipse.org...
>> What you can do is make your application start from the plugin's start
>> method, and stop from the plugins stop method and do away with the main
>> method. There is really more work to changing from a standard application
>> to an Eclipse Plugin than that though.
> Sorry for my bad English, I didn't completely understand what you wrote, did
> you mean to say that converting a java application into a plugin is much
> more difficult than this?
> Another question, it seems impossible to me that there isn't a command you
> can insert inside the code to execute another java file containing a main
> method (I mean, a command that is equal to "java" and javaw" from the
> command line). Does anybody know anything about it?
A static main method in a java class is the same as any other static
method. You can invoke it by calling ig from another java class. For
example, if you have a class called MyClass with a static main method, you
can invoke it like this:
...
String[] args = {"Arg1", "Arg2", "Arg3"};
MyClass.main(args);
...
|
|
|
Re: How 2 develop a plugin that runs a java application [message #285825 is a reply to message #285762] |
Thu, 26 May 2005 10:43  |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.rigidsoftware.com
Barli wrote:
> "CL [dnoyeb] Gilbert" <Lamont_Gilbert@rigidsoftware.com> ha scritto nel
> messaggio news:d6vmo1$a07$1@news.eclipse.org...
>
>>What you can do is make your application start from the plugin's start
>>method, and stop from the plugins stop method and do away with the main
>>method. There is really more work to changing from a standard application
>>to an Eclipse Plugin than that though.
>
>
> Sorry for my bad English, I didn't completely understand what you wrote, did
> you mean to say that converting a java application into a plugin is much
> more difficult than this?
> Another question, it seems impossible to me that there isn't a command you
> can insert inside the code to execute another java file containing a main
> method (I mean, a command that is equal to "java" and javaw" from the
> command line). Does anybody know anything about it?
>
>
creating a plugin is more complicated than what you have tried. Plugins
do not have main methods. They do have start and stop. You can try
there. But you should start by reading some of the examples on the
Eclipse.org homepage.
CL
|
|
|
Powered by
FUDForum. Page generated in 0.29768 seconds