Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Adding classes to startup.jar to get around JNI problems
Adding classes to startup.jar to get around JNI problems [message #547225] Thu, 15 July 2010 22:57 Go to next message
Eclipse UserFriend
I'm getting a ClassNotFoundException and I believe it is the same problem as
described here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=125250

I cannot modify the JNI code, so I'm trying to figure out this solution
mentioned: "I can make it work by manually putting the package in
startup.jar. This allows FindClass to locate it in the classpath (while
Eclipse apparently finds it in the plugin directory, since the jar files are
really in another plug-in)."

I cannot seem to find startup.jar though. It's not in my target. Does anyone
have any ideas? Or should I add my jar to the equinox.launcher plugin maybe?

And what is meant by "putting the package in startup.jar" Do I unzip the jar
and add my jar to it?

This class loading is driving me crazy. I'm familiar with buddy loading and
all, but this JNI thing doesn't want to budge.

- Ken
Re: Adding classes to startup.jar to get around JNI problems [message #547347 is a reply to message #547225] Fri, 16 July 2010 08:05 Go to previous messageGo to next message
Eclipse UserFriend
The startup.jar is gone, replaced by the launcher plugin in the
eclipse/plugins directory.

Instead of trying to modify your install, you could try some of the
classpath lookup changing runtime options:
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/reference/misc/runtime-options.html

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Adding classes to startup.jar to get around JNI problems [message #547829 is a reply to message #547225] Mon, 19 July 2010 13:41 Go to previous message
Eclipse UserFriend
I think what you really want is your jar to be on the system classpath.
The problem is that the executable sets the classpath when starting the java
vm and it only puts org.eclipse.equinox.launcher on the classpath.

You can invoke Java youself if you wanted with a command line something like

java -cp
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar;plu gins/my.plugin.jar
org.eclipse.equinox.launcher.Main



Ken Prole wrote:

> I'm getting a ClassNotFoundException and I believe it is the same problem
> as described here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=125250
>
> I cannot modify the JNI code, so I'm trying to figure out this solution
> mentioned: "I can make it work by manually putting the package in
> startup.jar. This allows FindClass to locate it in the classpath (while
> Eclipse apparently finds it in the plugin directory, since the jar files
> are really in another plug-in)."
>
> I cannot seem to find startup.jar though. It's not in my target. Does
> anyone have any ideas? Or should I add my jar to the equinox.launcher
> plugin maybe?
>
> And what is meant by "putting the package in startup.jar" Do I unzip the
> jar and add my jar to it?
>
> This class loading is driving me crazy. I'm familiar with buddy loading
> and all, but this JNI thing doesn't want to budge.
>
> - Ken
Previous Topic:How to define custom handler for standard command?
Next Topic:How to maximize and restore viewstack programatically?
Goto Forum:
  


Current Time: Mon Jul 07 06:58:57 EDT 2025

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

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

Back to the top