mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 02:58:00 +01:00
Fixes resources not found problem using Smack under an AppServer
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2200 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
29903213a3
commit
3db7e3fe4d
2 changed files with 23 additions and 12 deletions
|
@ -92,27 +92,32 @@ public class EnhancedDebugger implements SmackDebugger {
|
||||||
{
|
{
|
||||||
URL url;
|
URL url;
|
||||||
// Load the image icons
|
// Load the image icons
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/nav_left_blue.png");
|
url =
|
||||||
|
Thread.currentThread().getContextClassLoader().getResource("images/nav_left_blue.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
packetReceivedIcon = new ImageIcon(url);
|
packetReceivedIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/nav_right_red.png");
|
url =
|
||||||
|
Thread.currentThread().getContextClassLoader().getResource("images/nav_right_red.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
packetSentIcon = new ImageIcon(url);
|
packetSentIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/photo_portrait.png");
|
url =
|
||||||
|
Thread.currentThread().getContextClassLoader().getResource("images/photo_portrait.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
presencePacketIcon = new ImageIcon(url);
|
presencePacketIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/question_and_answer.png");
|
url =
|
||||||
|
Thread.currentThread().getContextClassLoader().getResource(
|
||||||
|
"images/question_and_answer.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
iqPacketIcon = new ImageIcon(url);
|
iqPacketIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/message.png");
|
url = Thread.currentThread().getContextClassLoader().getResource("images/message.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
messagePacketIcon = new ImageIcon(url);
|
messagePacketIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/unknown.png");
|
url = Thread.currentThread().getContextClassLoader().getResource("images/unknown.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
unknownPacketTypeIcon = new ImageIcon(url);
|
unknownPacketTypeIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,19 +84,25 @@ class EnhancedDebuggerWindow {
|
||||||
{
|
{
|
||||||
URL url;
|
URL url;
|
||||||
|
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/trafficlight_off.png");
|
url =
|
||||||
|
Thread.currentThread().getContextClassLoader().getResource(
|
||||||
|
"images/trafficlight_off.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
connectionCreatedIcon = new ImageIcon(url);
|
connectionCreatedIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/trafficlight_green.png");
|
url =
|
||||||
|
Thread.currentThread().getContextClassLoader().getResource(
|
||||||
|
"images/trafficlight_green.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
connectionActiveIcon = new ImageIcon(url);
|
connectionActiveIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/trafficlight_red.png");
|
url =
|
||||||
|
Thread.currentThread().getContextClassLoader().getResource(
|
||||||
|
"images/trafficlight_red.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
connectionClosedIcon = new ImageIcon(url);
|
connectionClosedIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
url = ClassLoader.getSystemClassLoader().getResource("images/warning.png");
|
url = Thread.currentThread().getContextClassLoader().getResource("images/warning.png");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
connectionClosedOnErrorIcon = new ImageIcon(url);
|
connectionClosedOnErrorIcon = new ImageIcon(url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue