From a9ba8f51ecdee27a9043cd8151e09f3eeadbe4ca Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 21 Sep 2012 21:24:43 -0500 Subject: [PATCH] IDEMPIERE-436 AdempiereActivator is not able to run 2Pack --- .../src/org/adempiere/plugin/utils/AdempiereActivator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java index 7ae0a580a9..75296cb2ec 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java @@ -62,12 +62,12 @@ public class AdempiereActivator implements BundleActivator { } protected void packIn(String trxName) { - URL packout = this.getClass().getClassLoader().getResource("/META-INF/2Pack.zip"); + URL packout = context.getBundle().getEntry("/META-INF/2Pack.zip"); if (packout != null) { IDictionaryService service = Service.locate(IDictionaryService.class); try { // copy the resource to a temporary file to process it with 2pack - InputStream stream = this.getClass().getResourceAsStream("/META-INF/2Pack.zip"); + InputStream stream = context.getBundle().getEntry("/META-INF/2Pack.zip").openStream(); File zipfile = File.createTempFile(getName(), ".zip"); FileOutputStream zipstream = new FileOutputStream(zipfile); byte[] buffer = new byte[1024];