19465
Port pluglets to linux and Solaris (This is not part of the build) git-svn-id: svn://10.0.0.236/trunk@54082 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
52
mozilla/java/plugins/classes/Makefile.in
Normal file
52
mozilla/java/plugins/classes/Makefile.in
Normal file
@@ -0,0 +1,52 @@
|
||||
#!gmake
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
# PENDING(frankm): find out how to define this for UNIX/SunOS
|
||||
JAVAC=$(JDKHOME)/bin/javac
|
||||
JAVALIB=$(JDKHOME)/lib
|
||||
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
||||
JAR_PLUGLET_CLASSES = \
|
||||
org/mozilla/util \
|
||||
org/mozilla/pluglet \
|
||||
org/mozilla/pluglet/mozilla \
|
||||
$(NULL)
|
||||
|
||||
ifdef JAVA_OR_NSJVM
|
||||
JDIRS = $(JAR_PLUGLET_CLASSES)
|
||||
endif
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath .:$(CLASSPATH) -d $(DIST)/classes
|
||||
|
||||
@@ -27,15 +27,22 @@ import java.util.jar.Attributes;
|
||||
import java.io.InputStream;
|
||||
import org.mozilla.pluglet.mozilla.*;
|
||||
import java.security.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class PlugletLoader {
|
||||
static {
|
||||
System.loadLibrary("plugletjni");
|
||||
Dimension screenSize = new Button().getToolkit().getScreenSize();
|
||||
}
|
||||
|
||||
|
||||
// path to jar file. Name of main class sould to be in MANIFEST.
|
||||
public static PlugletFactory getPluglet(String path) {
|
||||
try {
|
||||
org.mozilla.util.Debug.print("-- PlugletLoader.getPluglet("+path+")\n");
|
||||
URL url = new URL("file:/"+path);
|
||||
URL url = new URL("file://"+path);
|
||||
URLClassLoader loader = URLClassLoader.newInstance(new URL[]{url});
|
||||
URL manifestURL = new URL("jar:file:/"+path+"!/META-INF/MANIFEST.MF");
|
||||
URL manifestURL = new URL("jar:file://"+path+"!/META-INF/MANIFEST.MF");
|
||||
InputStream inputStream = manifestURL.openStream();
|
||||
Manifest manifest = new Manifest(inputStream);
|
||||
Attributes attr = manifest.getMainAttributes();
|
||||
@@ -75,7 +82,7 @@ public class PlugletLoader {
|
||||
public static String getMIMEDescription(String path) {
|
||||
try {
|
||||
org.mozilla.util.Debug.print("-- PlugletLoader.getMIMEDescription("+path+")\n");
|
||||
URL manifestURL = new URL("jar:file:/"+path+"!/META-INF/MANIFEST.MF");
|
||||
URL manifestURL = new URL("jar:file://"+path+"!/META-INF/MANIFEST.MF");
|
||||
InputStream inputStream = manifestURL.openStream();
|
||||
Manifest manifest = new Manifest(inputStream);
|
||||
Attributes attr = manifest.getMainAttributes();
|
||||
|
||||
@@ -22,8 +22,6 @@ package org.mozilla.util;
|
||||
|
||||
public class Debug {
|
||||
public static native void print(String str);
|
||||
static {
|
||||
System.loadLibrary("plugletjni");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user