|
Lines 9-14
Link Here
|
| 9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
| 10 |
* Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 83258 [jar exporter] Deploy java application as executable jar |
10 |
* Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 83258 [jar exporter] Deploy java application as executable jar |
| 11 |
* Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 220257 [jar application] ANT build file does not create Class-Path Entry in Manifest |
11 |
* Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 220257 [jar application] ANT build file does not create Class-Path Entry in Manifest |
|
|
12 |
* Ferenc Hechler, ferenc_hechler@users.sourceforge.net - 243163 [jar exporter] export directory entries in "Runnable JAR File" |
| 12 |
*******************************************************************************/ |
13 |
*******************************************************************************/ |
| 13 |
package org.eclipse.jdt.internal.ui.jarpackagerfat; |
14 |
package org.eclipse.jdt.internal.ui.jarpackagerfat; |
| 14 |
|
15 |
|
|
Lines 19-25
Link Here
|
| 19 |
import java.util.zip.ZipEntry; |
20 |
import java.util.zip.ZipEntry; |
| 20 |
import java.util.zip.ZipFile; |
21 |
import java.util.zip.ZipFile; |
| 21 |
|
22 |
|
| 22 |
import org.eclipse.core.runtime.Assert; |
|
|
| 23 |
import org.eclipse.core.runtime.CoreException; |
23 |
import org.eclipse.core.runtime.CoreException; |
| 24 |
import org.eclipse.core.runtime.IPath; |
24 |
import org.eclipse.core.runtime.IPath; |
| 25 |
import org.eclipse.core.runtime.Path; |
25 |
import org.eclipse.core.runtime.Path; |
|
Lines 48-53
Link Here
|
| 48 |
} |
48 |
} |
| 49 |
|
49 |
|
| 50 |
public void addZipEntry(ZipEntry zipEntry, ZipFile zipFile, String path) throws IOException { |
50 |
public void addZipEntry(ZipEntry zipEntry, ZipFile zipFile, String path) throws IOException { |
|
|
51 |
if (fJarPackage.areDirectoryEntriesIncluded()) |
| 52 |
addDirectories(path); |
| 51 |
JarEntry newEntry= new JarEntry(path.replace(File.separatorChar, '/')); |
53 |
JarEntry newEntry= new JarEntry(path.replace(File.separatorChar, '/')); |
| 52 |
|
54 |
|
| 53 |
if (fJarPackage.isCompressed()) |
55 |
if (fJarPackage.isCompressed()) |
|
Lines 69-76
Link Here
|
| 69 |
|
71 |
|
| 70 |
public void write(File file, IPath destinationPath) throws CoreException { |
72 |
public void write(File file, IPath destinationPath) throws CoreException { |
| 71 |
try { |
73 |
try { |
| 72 |
Assert.isLegal(!fJarPackage.areDirectoryEntriesIncluded());//Fat JAR writer does not include directory entries |
|
|
| 73 |
|
| 74 |
addFile(file, destinationPath); |
74 |
addFile(file, destinationPath); |
| 75 |
} catch (IOException ex) { |
75 |
} catch (IOException ex) { |
| 76 |
// Ensure full path is visible |
76 |
// Ensure full path is visible |
|
Lines 86-91
Link Here
|
| 86 |
} |
86 |
} |
| 87 |
|
87 |
|
| 88 |
private void addFile(File file, IPath path) throws IOException { |
88 |
private void addFile(File file, IPath path) throws IOException { |
|
|
89 |
if (fJarPackage.areDirectoryEntriesIncluded()) |
| 90 |
addDirectories(path); |
| 89 |
JarEntry newEntry= new JarEntry(path.toString().replace(File.separatorChar, '/')); |
91 |
JarEntry newEntry= new JarEntry(path.toString().replace(File.separatorChar, '/')); |
| 90 |
|
92 |
|
| 91 |
if (fJarPackage.isCompressed()) |
93 |
if (fJarPackage.isCompressed()) |