Cannot See Tools - >Menu item after deploy the jar file

This topic has been viewed 7976 times and has 7 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
hariras
Posts: 1
Joined: Thu May 01, 2014 8:16 am

Cannot See Tools - >Menu item after deploy the jar file

Post by hariras »

I have tried the SweetHome 3D plugin developer guide. But as it explains I can't see the Tool menu item on the menu bar. Can anyone help me to solve this problem? [:(]
susonne
Posts: 7
Joined: Fri May 16, 2014 10:06 am
Country: Denmark

Re: Cannot See Tools - >Menu item after deploy the jar file

Post by susonne »

Did you check if the jar file is within the mentioned directories?
User avatar
clanmills
Posts: 33
Joined: Fri May 16, 2014 4:50 am
Country: Camberley, Surrey, England
Contact:

Re: Cannot See Tools - >Menu item after deploy the jar file

Post by clanmills »

I'm have the same issue on a Mac running Mavericks and SW3D 4.3.1 (from the App Store). I believe the jar is in the correct location.

[font=courier new]1110 ~/Library/Application Support/eTeks/Sweet Home 3D $ ls -alt plugins/
total 8
-rwxr-xr-x 1 rmills wheel 557 May 19 19:30 VolumePlugin.jar
1111 ~/Library/Application Support/eTeks/Sweet Home 3D $[/font]

I also tried placing it in the application's Plugins directory:
[font=courier new]/Applications/Sweet Home 3D.app/Contents/Plugins[/font]

I've also downloaded the 4.3 source, and built and ran from Eclipse.

Sadly, no Tools menu. All help appreciated. I'm going off to read the code where the Tools menu is created.
User avatar
clanmills
Posts: 33
Joined: Fri May 16, 2014 4:50 am
Country: Camberley, Surrey, England
Contact:

Re: Cannot See Tools - >Menu item after deploy the jar file

Post by clanmills »

I have the same issue on the Mac. The plugin is located at:
~/Library/Application Support/eTeks/Sweet Home 3D/plugins/VolumePlugin.jar

PluginManager.loadPlugins tries to load him and throws an exception when he calls readPlugin.
[font=courier new]readPlugin(ResourceBundle.getBundle(applicationPluginFamily, Locale.getDefault(), classLoader),
pluginLocation,
"jar:" + pluginUrl.toString() + "!/" + URLEncoder.encode(zipEntryName, "UTF-8").replace("+", "%20"),
classLoader);[/font]

He appears to searching for 'ApplicationPlugin' in the bundle. The jar does contain the ApplicationPlugin.properties file. For sure, there's nothing much wrong here, however I don't know how to fix it!
User avatar
clanmills
Posts: 33
Joined: Fri May 16, 2014 4:50 am
Country: Camberley, Surrey, England
Contact:

Re: Cannot See Tools - >Menu item after deploy the jar file

Post by clanmills »

I've found it! I had two errors:
1) I had the ApplicationPlugin.proprerties file in the src directory. I moved it.
Image
2) There was a space on the end of the 'ApplicationPlugin.properties ' <-- horrid little space after the s ! (software grrrrrrr). I've no idea how it got there. I used Refactor/Rename to fix it.

File/Export offers the ApplicationPlugin.properties:
Image

All good. And the VolumePlugin yields believable results!
User avatar
clanmills
Posts: 33
Joined: Fri May 16, 2014 4:50 am
Country: Camberley, Surrey, England
Contact:

Re: Cannot See Tools - >Menu item after deploy the jar file

Post by clanmills »

Just one more comment about this matter. I was surprised to be unable to this to work on SH3D 4.3.1 downloaded from the App Store. I'm not going to worry about this as it's working fine using the source code build of 4.3 and the trunk build of SH3D.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Cannot See Tools - >Menu item after deploy the jar file

Post by Puybaret »

In a way, I'm also astonished that it works with Mac App Store version, since running a plug-in could feel like going out of OSX sandbox. But keep in mind that OSX sandbox is much less restrictive than the one provided with the Java plug-in, and that the JRE copy provided with Sweet Home 3D MAS version is sandboxed, meaning that any Java plug-in is sandboxed too.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
clanmills
Posts: 33
Joined: Fri May 16, 2014 4:50 am
Country: Camberley, Surrey, England
Contact:

Re: Cannot See Tools - >Menu item after deploy the jar file

Post by clanmills »

[:)] I think there's a little confusion here. It did NOT work with the 4.3.1 version from the Mac App Store. I also wondered if this was because of the the OSX sandbox. Let's not worry about this.

It's working fine when I build with the 4.3 source and the trunk from SourceForge. [*-:)]
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest