RMI and ClassFormatException
Hello, I'm trying the WeatherServer RMI example out of the "Just Java 2" book and I'm getting the following exception. I am using Blackdown's JDK1.2 and the jre under that distribution under RedHat 6.1. Exception in thread "main" java.lang.ClassFormatError: weather/RMIdemo (Bad magic number) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Compiled Code) at java.security.SecureClassLoader.defineClass(Compiled Code) at java.net.URLClassLoader.defineClass(Compiled Code) at java.net.URLClassLoader.access$1(Compiled Code) at java.net.URLClassLoader$1.run(Compiled Code) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at sun.misc.Launcher$AppClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) begin:vcard n:Grepps;Paul tel;home:(703) 327-0768 x-mozilla-html:TRUE org:Lightningcast Inc. adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Principal Engineer x-mozilla-cpt:;0 fn:Paul Grepps end:vcard
Re: Java and Redhat 6.1
Roland Silver wrote: > I'm thinking about upgrading my Linux machine from Redhat 6.0 to > version 6.1, but I don't want to break my Java setup in the process. > > I'm using Blackdown Java 1.1.7v3 with the xx libraries, and I don't > want to go to Java 1.2 until Blackdown makes a stable release. > > Will Redhat 6.1 support my current Java configuration? > -- Roland Silver <[EMAIL PROTECTED]> > We are using Redhat 6.1 for development machines and the JDK1.2. We also have the JRE for 1.1.7v3 installed in order to run some of the older applications. JRE 1.1.7v3 worked for our Oracle install script, but sometimes it seems to crash XFree86 or Gnome/Enlightenment. I believe it is crashing X because my screen blinks three times and then goes back to the login prompt and I lose all my open work. I tried downloading AnyJ, a free Java IDE from http://www.netcomputing.de/moreanyj.html , and I believe jre 1.1.7v3 is crashing XFree86 with this as well. I would be interested to hear any similar problems that people are experiencing with XFree86/Gnome/Enlightenment setup and running GUI apps with JRE 1.1.7v3 or JRE 1.2. Hope this helps you make a decision :-) Regards, Paul Grepps begin:vcard n:Grepps;Paul tel;home:(703) 327-0768 x-mozilla-html:TRUE org:Lightningcast Inc. adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Principal Engineer x-mozilla-cpt:;0 fn:Paul Grepps end:vcard
Pass by Reference question.
I expected the following to work since Objects are supposedly pass-by-reference.
Am I doing something wrong here?
I'm just trying to change a Boolean value inside of a method and return
as pass-by-reference to the caller.
My environment is:
Blackdown JDK1.2 pre2, RedHat 6.1, glibc 2.1.2
The output of the following program is:
Boolean before: false
changeBoolean(): false
changeBoolean(): true
Boolean after: false
I expected the Boolean after: to be true.
--
public class BooleanTest2 {
public void changeBoolean(Boolean b) {
System.out.println("changeBoolean():
" + b.booleanValue());
b = Boolean.TRUE;
System.out.println("changeBoolean():
" + b.booleanValue());
}
public static void main(String args[])
{
BooleanTest2 bt = new BooleanTest2();
Boolean bool = new Boolean(false);
System.out.println("Boolean
before: " + bool.booleanValue());
bt.changeBoolean(bool);
System.out.println("Boolean
after: " + bool.booleanValue());
}
}
begin:vcard
n:Grepps;Paul
tel;home:(703) 327-0768
x-mozilla-html:TRUE
org:Lightningcast Inc.
adr:;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Principal Engineer
x-mozilla-cpt:;0
fn:Paul Grepps
end:vcard
