Re: Help with Java package needed
Hi Markus,
On Sun, Apr 26, 2015 at 04:09:16PM +0200, Markus Koschany wrote:
>
> The problem is that in src/org/gel/mauve/MyConsole.java and in
> src/org/gel/mauve/gui/MauveFrame.java the console variable is of type
> JConsole but it should be JConsolePane. I would file an upstream bug
> report for this.
I commited your patch and the package does build now. However, if I try
to run mauve I get:
$ mauve
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: gr/zeus/ui/JConsole
at org.gel.mauve.MyConsole.<clinit>(Unknown Source)
at org.gel.mauve.gui.Mauve.init(Unknown Source)
at org.gel.mauve.gui.Mauve$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:699)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.ClassNotFoundException: gr.zeus.ui.JConsole
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 17 more
So for whatever reason zeus-jscl is not found. :-(
Any further hint?
Kind regards
Andreas.
> From: Markus Koschany <apo@gambaru.de>
> Date: Sun, 26 Apr 2015 15:22:19 +0200
> Subject: MyConsole
>
> ---
> src/org/gel/mauve/MyConsole.java | 16 +++++++++-------
> src/org/gel/mauve/gui/MauveFrame.java | 3 +--
> 2 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/src/org/gel/mauve/MyConsole.java b/src/org/gel/mauve/MyConsole.java
> index 1781510..d9e7c3a 100644
> --- a/src/org/gel/mauve/MyConsole.java
> +++ b/src/org/gel/mauve/MyConsole.java
> @@ -10,18 +10,20 @@ import java.io.PrintStream;
> public class MyConsole {
> private static boolean useSwing = false;
>
> - private static JConsole console;
> + private static JConsole console = new JConsole();
>
> public static void setUseSwing (boolean b) {
> if (b && !useSwing) {
> - console = JConsole.getConsole ();
> console.setTitle ("Mauve Console");
> console.setSize (400, 400);
> Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
> console.setLocation(dim.width-400, 0);
> - console.startConsole ();
> + JConsole.getConsole().startConsole ();
> + if (!console.isVisible()) {
> + console.setVisible(true);
> + }
> } else if (!b && useSwing) {
> - console.stopConsole ();
> + JConsole.getConsole().stopConsole ();
> console = null;
> }
>
> @@ -30,13 +32,13 @@ public class MyConsole {
>
> public static void showConsole () {
> if (useSwing) {
> - console.showConsole ();
> + JConsole.getConsole().showConsole ();
> }
> }
>
> public static PrintStream err () {
> if (useSwing) {
> - console.showConsole ();
> + JConsole.getConsole().showConsole ();
> }
> return System.err;
> }
> @@ -44,4 +46,4 @@ public class MyConsole {
> public static PrintStream out () {
> return System.out;
> }
> -}
> \ No newline at end of file
> +}
> diff --git a/src/org/gel/mauve/gui/MauveFrame.java b/src/org/gel/mauve/gui/MauveFrame.java
> index eda9460..e82111e 100644
> --- a/src/org/gel/mauve/gui/MauveFrame.java
> +++ b/src/org/gel/mauve/gui/MauveFrame.java
> @@ -497,8 +497,7 @@ public class MauveFrame extends JFrame implements ActionListener, ModelProgressL
> }
> if (source == jMenuHelpConsole || ae.getActionCommand().equals("Console"))
> {
> - JConsole console = JConsole.getConsole();
> - console.showConsole();
> + JConsole.getConsole().showConsole();
> }
> if (source == jMenuHelpClearCache || ae.getActionCommand().equals("ClearCache"))
> {
--
http://fam-tille.de
Reply to: