Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How to build an Equinox server product for Linux?
How to build an Equinox server product for Linux? [message #92453] Fri, 20 July 2007 10:59 Go to next message
Stephan is currently offline StephanFriend
Messages: 14
Registered: July 2009
Junior Member
Hi

- We are using Eclipse 3.3
- We created a plugin that contains an application (implementation of IApplication). The application does not make any contributions to the UI and it is NOT an RCP application. It has no graphical user interface, just the console.
- We created a product that references the above application
- We export the product on Windows and everything works fine.

Next, we wanted to install our server application on Linux. We assumed the RCP delta pack would be a good solution because it supports cross-platform builds. The problem is, that the product build always assumes that a window system is installed on Linux (gtk, motif), which is not the case on our server. What we would need now is a "console build". How can this be achieved with product export (or headless build)?

If the current product export does not support this, what is the best way to start an exported feature (which does not contain any executable)?

Thanks for your help,
Stephan
Re: How to build an Equinox server product for Linux? [message #92468 is a reply to message #92453] Fri, 20 July 2007 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

The launcher (eclipse) is dynamically linked to GTK, so if you don't have that library installed, the launcher won't run. The easiest solution is to install GTK, even if it's on a headless box ...

The other possibility is that you find the launcher jar (in eclipse/plugins/org.eclipse.something.launcher_something/) and try running the main class (used to be EclipseStarter) from a Java prompt with java -jar. This used to work in 3.2 days, and although the location of the startup jar has moved, I suspect something like that might still work in 3.3 days.

Might be worth finding the enhancement request at https://bugs.eclipse.org for an 'eclipsec' variant on Linux which isn't built against GTK, or creating one if you can't find it.

Alex.
Re: How to build an Equinox server product for Linux? [message #92483 is a reply to message #92468] Fri, 20 July 2007 14:39 Go to previous messageGo to next message
Stephan is currently offline StephanFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Alex

I tried to do the same as described in http://www.eclipse.org/equinox/documents/quickstart.php, i.e.,
starting the application with "java -jar org.eclipse.osgi_3.3.0.v20070530.jar -console -consoleLog"

It starts my application but I get "java.lang.NoClassDefFoundError: com/sun/crypto/provider/SunJCE". Usually, this can be solved by setting "osgi.parentClassloader=ext", which I did in config.ini and it is correctly set when I do the command "getprop" in the console:
osgi> getprop osgi.parentClassloader
osgi.parentClassloader=ext
But unfortunately, it did not help in this case. Is classloading different if not started by the launcher.exe?

Cheers, Stephan

My file structure looks like this:
eclipse
|launch.bat
|org.eclipse.core.runtime_3.3.100.v20070530.jar
|org.eclipse.equinox.common_3.3.0.v20070426.jar
|org.eclipse.osgi_3.3.0.v20070530.jar
|org.eclipse.update.configurator_3.2.100.v20070615.jar
|configuration
|-config.ini
|plugins
|- all other required plugin

launch.bat:
java -jar org.eclipse.osgi_3.3.0.v20070530.jar -console -consoleLog

config.ini:
osgi.parentClassloader=ext
osgi.splashPath=platform:/base/plugins/com.diligentit.cctv.s erver.config
eclipse.product=com.diligentit.cctv.server.config.cfgserver
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
osgi.bundles.defaultStartLevel=4
Re: How to build an Equinox server product for Linux? [message #92498 is a reply to message #92483] Fri, 20 July 2007 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

Depends what VM you're running on. If you're running on a non-sun VM, then that file might not even be there.

Alex.
Re: How to build an Equinox server product for Linux? [message #92513 is a reply to message #92498] Fri, 20 July 2007 15:41 Go to previous message
Stephan is currently offline StephanFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Alex

The file is there and inside Eclipse (with the same JRE) it works perfect.

We now found out that it works, when we set the "Eclipse-BuddyPolicy: ext" in the plugin that accesses the encryption classes (which is in a different plugin than the application). osgi.parentClassloader is not set anymore.

We haven't find out yet, if this has any other (negative) influences on the rest of the application. Do you see any problems?

Cheers, Stephan
Previous Topic:jetty 6 osgi support
Next Topic:Activator is Invalid
Goto Forum:
  


Current Time: Tue May 07 15:52:29 GMT 2024

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

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

Back to the top