本文整理了Java中java.applet.Applet.getCodeBase()
方法的一些代码示例,展示了Applet.getCodeBase()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Applet.getCodeBase()
方法的具体详情如下:
包路径:java.applet.Applet
类名称:Applet
方法名:getCodeBase
暂无
代码示例来源:origin: redisson/redisson
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: org.javassist/javassist
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(@SuppressWarnings("deprecation") java.applet.Applet applet) {
@SuppressWarnings("deprecation")
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: scouter-project/scouter
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: scouter-project/scouter
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(@SuppressWarnings("deprecation") java.applet.Applet applet) {
@SuppressWarnings("deprecation")
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: ATLauncher/ATLauncher
@Override
public URL getCodeBase() {
return wrappedApplet.getCodeBase();
}
代码示例来源:origin: Spoutcraft/LegacyLauncher
@Override
public URL getCodeBase() {
return minecraftApplet.getCodeBase();
}
代码示例来源:origin: org.jboss.javassist/com.springsource.javassist
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: dingjs/javaagent
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: jobop/anylog
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: org.jboss/javassist
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: KostyaSha/yet-another-docker-plugin
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(Applet applet) {
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: io.github.scouter-project/scouter-agent-java
/**
* Constructs an object importer.
*
* <p>Remote objects are imported from the web server that the given
* applet has been loaded from.
*
* @param applet the applet loaded from the <code>Webserver</code>.
*/
public ObjectImporter(@SuppressWarnings("deprecation") java.applet.Applet applet) {
@SuppressWarnings("deprecation")
URL codebase = applet.getCodeBase();
orgServername = servername = codebase.getHost();
orgPort = port = codebase.getPort();
}
代码示例来源:origin: stackoverflow.com
import java.applet.*;
import java.awt.*;
public class FromWhere extends Applet {
public void init() {
Label label = new Label(getCodeBase().toString());
add(label);
}
}
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
public static DataCollector create( Applet app, Properties props,
String localHostName )
{
String appletHost = localHostName ;
if (app != null) {
URL appletCodeBase = app.getCodeBase() ;
if (appletCodeBase != null)
appletHost = appletCodeBase.getHost() ;
}
return new AppletDataCollector( app, props, localHostName,
appletHost ) ;
}
代码示例来源:origin: stackoverflow.com
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;
public class ImageExample2 extends Applet {
private Image bi;
public void init() {
resize(500, 500);
System.out.println(getCodeBase()); // file:/D:/Workspace/JavaProject/bin/
// This the actual code that should be used to read the image in Applet
bi = getImage(getCodeBase(), "images/222.png");
}
public void paint(Graphics g) {
g.drawImage(bi, 20, 140, this);
}
}
代码示例来源:origin: stackoverflow.com
import java.awt.GridLayout;
import javax.swing.*;
// <applet code=WhereAmIApplet width=500 height=50></applet>
public class WhereAmIApplet extends JApplet {
@Override
public void init() {
setLayout(new GridLayout(0,1,5,5));
add(new JLabel("Document Base: " + getDocumentBase()));
add(new JLabel("Code Base: " + getCodeBase()));
}
}
代码示例来源:origin: stackoverflow.com
import java.applet.AudioClip;
import javax.swing.JApplet;
@SuppressWarnings("serial")
public class audioPlayer extends JApplet{
AudioClip aClip;
public void init(){
System.out.print("Getting audio clip!");
aClip = getAudioClip(getCodeBase(), "tetris.wav");
System.out.print("Looping audio clip!");
aClip.loop();
}
}
内容来源于网络,如有侵权,请联系作者删除!