Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Standalone Main Application
EMF Standalone Main Application [message #423907] Thu, 09 October 2008 14:05 Go to next message
exquisitus is currently offline exquisitusFriend
Messages: 211
Registered: July 2009
Senior Member
Hi

I use my EMF Model which based on a XML-Schemata in a RCP and in a
Plug-in which can be run in command line as stand-alone application.

The Plug-in xyz.jar starts fine. But if i try to load my XML-File
i get a excption that the class
org/eclipse/emf/ecore/resource/resourceSet was not found.
Do i have to set a classpath ?

Here my manifest file:
Manifest-Version: 1.0
Main-Class: build.main.BuildMain
Bundle-ManifestVersion: 2
Bundle-Name: Build Plug-in
Bundle-SymbolicName: build
Bundle-Version: 2.1.8
Bundle-Activator: build.BuildPlugin
Bundle-Vendor: Manager
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
build.plugin.monitor,
plugin.model,
org.eclipse.emf.common,
org.eclipse.emf.ecore.xmi
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Export-Package: build.main
Bundle-ClassPath: src/libs/javaAPI.jar,
src/libs/jdom.jar,
src/libs/xerces.jar,
.
Re: EMF Standalone Main Application [message #423912 is a reply to message #423907] Thu, 09 October 2008 15:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
An RCP application normally should be started as a proper Eclipse
application, not just by setting up the classpath. Maybe you need
org.eclipse.emf.ecore in the list below?


exquisitus wrote:
> Hi
>
> I use my EMF Model which based on a XML-Schemata in a RCP and in a
> Plug-in which can be run in command line as stand-alone application.
>
> The Plug-in xyz.jar starts fine. But if i try to load my XML-File
> i get a excption that the class
> org/eclipse/emf/ecore/resource/resourceSet was not found.
> Do i have to set a classpath ?
>
> Here my manifest file:
> Manifest-Version: 1.0
> Main-Class: build.main.BuildMain
> Bundle-ManifestVersion: 2
> Bundle-Name: Build Plug-in
> Bundle-SymbolicName: build
> Bundle-Version: 2.1.8
> Bundle-Activator: build.BuildPlugin
> Bundle-Vendor: Manager
> Require-Bundle: org.eclipse.ui,
> org.eclipse.core.runtime,
> build.plugin.monitor,
> plugin.model,
> org.eclipse.emf.common,
> org.eclipse.emf.ecore.xmi
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
> Bundle-ActivationPolicy: lazy
> Export-Package: build.main
> Bundle-ClassPath: src/libs/javaAPI.jar,
> src/libs/jdom.jar,
> src/libs/xerces.jar,
> .
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF Standalone Main Application [message #423983 is a reply to message #423912] Mon, 13 October 2008 13:18 Go to previous messageGo to next message
exquisitus is currently offline exquisitusFriend
Messages: 211
Registered: July 2009
Senior Member
sorry didnt explain it correct i got three Plug-in

1. plugin.rcp
2. plugin.model
3. plugin.commandline

In my RCP plugin all works fine i can load, edit the Model. My
commandline plugin has a classic Java Main Application.
I want to load in the commandline plugin a XML-File and use therefor
i use my generated EMf model plugin.

So what do i have to enter in the MANIFEST.MF to run this?

Thanks

Ed Merks schrieb:
> An RCP application normally should be started as a proper Eclipse
> application, not just by setting up the classpath. Maybe you need
> org.eclipse.emf.ecore in the list below?
>
>
> exquisitus wrote:
>> Hi
>>
>> I use my EMF Model which based on a XML-Schemata in a RCP and in a
>> Plug-in which can be run in command line as stand-alone application.
>>
>> The Plug-in xyz.jar starts fine. But if i try to load my XML-File
>> i get a excption that the class
>> org/eclipse/emf/ecore/resource/resourceSet was not found.
>> Do i have to set a classpath ?
>>
>> Here my manifest file:
>> Manifest-Version: 1.0
>> Main-Class: build.main.BuildMain
>> Bundle-ManifestVersion: 2
>> Bundle-Name: Build Plug-in
>> Bundle-SymbolicName: build
>> Bundle-Version: 2.1.8
>> Bundle-Activator: build.BuildPlugin
>> Bundle-Vendor: Manager
>> Require-Bundle: org.eclipse.ui,
>> org.eclipse.core.runtime,
>> build.plugin.monitor,
>> plugin.model,
>> org.eclipse.emf.common,
>> org.eclipse.emf.ecore.xmi
>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>> Bundle-ActivationPolicy: lazy
>> Export-Package: build.main
>> Bundle-ClassPath: src/libs/javaAPI.jar,
>> src/libs/jdom.jar,
>> src/libs/xerces.jar,
>> .
>>
Re: EMF Standalone Main Application [message #423985 is a reply to message #423983] Mon, 13 October 2008 15:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
You can look at the dependencies listed within each plugin when viewed
in the package explorer. You'll need those. You might also need
registrations that others happen because of plugin.xml processing.


exquisitus wrote:
> sorry didnt explain it correct i got three Plug-in
>
> 1. plugin.rcp
> 2. plugin.model
> 3. plugin.commandline
>
> In my RCP plugin all works fine i can load, edit the Model. My
> commandline plugin has a classic Java Main Application.
> I want to load in the commandline plugin a XML-File and use therefor
> i use my generated EMf model plugin.
>
> So what do i have to enter in the MANIFEST.MF to run this?
>
> Thanks
>
> Ed Merks schrieb:
>> An RCP application normally should be started as a proper Eclipse
>> application, not just by setting up the classpath. Maybe you need
>> org.eclipse.emf.ecore in the list below?
>>
>>
>> exquisitus wrote:
>>> Hi
>>>
>>> I use my EMF Model which based on a XML-Schemata in a RCP and in a
>>> Plug-in which can be run in command line as stand-alone application.
>>>
>>> The Plug-in xyz.jar starts fine. But if i try to load my XML-File
>>> i get a excption that the class
>>> org/eclipse/emf/ecore/resource/resourceSet was not found.
>>> Do i have to set a classpath ?
>>>
>>> Here my manifest file:
>>> Manifest-Version: 1.0
>>> Main-Class: build.main.BuildMain
>>> Bundle-ManifestVersion: 2
>>> Bundle-Name: Build Plug-in
>>> Bundle-SymbolicName: build
>>> Bundle-Version: 2.1.8
>>> Bundle-Activator: build.BuildPlugin
>>> Bundle-Vendor: Manager
>>> Require-Bundle: org.eclipse.ui,
>>> org.eclipse.core.runtime,
>>> build.plugin.monitor,
>>> plugin.model,
>>> org.eclipse.emf.common,
>>> org.eclipse.emf.ecore.xmi
>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>> Bundle-ActivationPolicy: lazy
>>> Export-Package: build.main
>>> Bundle-ClassPath: src/libs/javaAPI.jar,
>>> src/libs/jdom.jar,
>>> src/libs/xerces.jar,
>>> .
>>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF Standalone Main Application [message #424049 is a reply to message #423985] Wed, 15 October 2008 09:35 Go to previous messageGo to next message
exquisitus is currently offline exquisitusFriend
Messages: 211
Registered: July 2009
Senior Member
I do not realy knwo what you mean with

you might also need registrations that others happen because of
plugin.xml processing.

To start my command line i put the following jar in a dirctory

org.eclipse.core.runtime,
build.plugin.monitor,
plugin.model,
org.eclipse.emf.common,
org.eclipse.emf.ecore.xmi

then i start the commandline plugin like this

java -jar plugin.model-jar load C:/testfile.xml

then i become the exception


Ed Merks schrieb:
> You can look at the dependencies listed within each plugin when viewed
> in the package explorer. You'll need those. You might also need
> registrations that others happen because of plugin.xml processing.
>
>
> exquisitus wrote:
>> sorry didnt explain it correct i got three Plug-in
>>
>> 1. plugin.rcp
>> 2. plugin.model
>> 3. plugin.commandline
>>
>> In my RCP plugin all works fine i can load, edit the Model. My
>> commandline plugin has a classic Java Main Application.
>> I want to load in the commandline plugin a XML-File and use therefor
>> i use my generated EMf model plugin.
>>
>> So what do i have to enter in the MANIFEST.MF to run this?
>>
>> Thanks
>>
>> Ed Merks schrieb:
>>> An RCP application normally should be started as a proper Eclipse
>>> application, not just by setting up the classpath. Maybe you need
>>> org.eclipse.emf.ecore in the list below?
>>>
>>>
>>> exquisitus wrote:
>>>> Hi
>>>>
>>>> I use my EMF Model which based on a XML-Schemata in a RCP and in a
>>>> Plug-in which can be run in command line as stand-alone application.
>>>>
>>>> The Plug-in xyz.jar starts fine. But if i try to load my XML-File
>>>> i get a excption that the class
>>>> org/eclipse/emf/ecore/resource/resourceSet was not found.
>>>> Do i have to set a classpath ?
>>>>
>>>> Here my manifest file:
>>>> Manifest-Version: 1.0
>>>> Main-Class: build.main.BuildMain
>>>> Bundle-ManifestVersion: 2
>>>> Bundle-Name: Build Plug-in
>>>> Bundle-SymbolicName: build
>>>> Bundle-Version: 2.1.8
>>>> Bundle-Activator: build.BuildPlugin
>>>> Bundle-Vendor: Manager
>>>> Require-Bundle: org.eclipse.ui,
>>>> org.eclipse.core.runtime,
>>>> build.plugin.monitor,
>>>> plugin.model,
>>>> org.eclipse.emf.common,
>>>> org.eclipse.emf.ecore.xmi
>>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>>> Bundle-ActivationPolicy: lazy
>>>> Export-Package: build.main
>>>> Bundle-ClassPath: src/libs/javaAPI.jar,
>>>> src/libs/jdom.jar,
>>>> src/libs/xerces.jar,
>>>> .
>>>>
Re: EMF Standalone Main Application [message #424086 is a reply to message #424049] Thu, 16 October 2008 00:14 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Comments below.

exquisitus wrote:
> I do not realy knwo what you mean with
>
> you might also need registrations that others happen because of
> plugin.xml processing.
You really need to read about Eclipse extension points...
>
> To start my command line i put the following jar in a dirctory
>
> org.eclipse.core.runtime,
> build.plugin.monitor,
> plugin.model,
> org.eclipse.emf.common,
> org.eclipse.emf.ecore.xmi
Where is org.eclipse.emf.ecore?
>
> then i start the commandline plugin like this
>
> java -jar plugin.model-jar load C:/testfile.xml
>
> then i become the exception
I should guess the exception?

If you invoke "Generate Test Code" and run the generated XyzExample.java
in the *.tests project as a standalone Java application, that should run
properly. Maybe that will be a good starting point...
>
>
> Ed Merks schrieb:
>> You can look at the dependencies listed within each plugin when
>> viewed in the package explorer. You'll need those. You might also
>> need registrations that others happen because of plugin.xml processing.
>>
>>
>> exquisitus wrote:
>>> sorry didnt explain it correct i got three Plug-in
>>>
>>> 1. plugin.rcp
>>> 2. plugin.model
>>> 3. plugin.commandline
>>>
>>> In my RCP plugin all works fine i can load, edit the Model. My
>>> commandline plugin has a classic Java Main Application.
>>> I want to load in the commandline plugin a XML-File and use therefor
>>> i use my generated EMf model plugin.
>>>
>>> So what do i have to enter in the MANIFEST.MF to run this?
>>>
>>> Thanks
>>>
>>> Ed Merks schrieb:
>>>> An RCP application normally should be started as a proper Eclipse
>>>> application, not just by setting up the classpath. Maybe you need
>>>> org.eclipse.emf.ecore in the list below?
>>>>
>>>>
>>>> exquisitus wrote:
>>>>> Hi
>>>>>
>>>>> I use my EMF Model which based on a XML-Schemata in a RCP and in a
>>>>> Plug-in which can be run in command line as stand-alone application.
>>>>>
>>>>> The Plug-in xyz.jar starts fine. But if i try to load my XML-File
>>>>> i get a excption that the class
>>>>> org/eclipse/emf/ecore/resource/resourceSet was not found.
>>>>> Do i have to set a classpath ?
>>>>>
>>>>> Here my manifest file:
>>>>> Manifest-Version: 1.0
>>>>> Main-Class: build.main.BuildMain
>>>>> Bundle-ManifestVersion: 2
>>>>> Bundle-Name: Build Plug-in
>>>>> Bundle-SymbolicName: build
>>>>> Bundle-Version: 2.1.8
>>>>> Bundle-Activator: build.BuildPlugin
>>>>> Bundle-Vendor: Manager
>>>>> Require-Bundle: org.eclipse.ui,
>>>>> org.eclipse.core.runtime,
>>>>> build.plugin.monitor,
>>>>> plugin.model,
>>>>> org.eclipse.emf.common,
>>>>> org.eclipse.emf.ecore.xmi
>>>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>>>> Bundle-ActivationPolicy: lazy
>>>>> Export-Package: build.main
>>>>> Bundle-ClassPath: src/libs/javaAPI.jar,
>>>>> src/libs/jdom.jar,
>>>>> src/libs/xerces.jar,
>>>>> .
>>>>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Generating Edit Code into the Model Project
Next Topic:uma model editor - resource does not exist
Goto Forum:
  


Current Time: Fri Apr 19 07:12:15 GMT 2024

Powered by FUDForum. Page generated in 0.02097 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top