Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 15th, 2004, 08:57 AM
Authorized User
 
Join Date: Jul 2003
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Why rmi don't run?

I want to use RMI,my JDK is java version "1.4.1_02",and I use j2sdkee1.3.1,when I run command rmic, I got errors,like follows:

C:\>rmic
Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/java/Consta
nts
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java :502)
        at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader .java:250)
        at java.net.URLClassLoader.access$100(URLClassLoader. java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java: 193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.j ava:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:2 99)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:2 55)
        at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:315)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java :502)
        at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader .java:250)
        at java.net.URLClassLoader.access$100(URLClassLoader. java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java: 193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.j ava:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:2 99)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:2 92)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:2 55)
        at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:315)

Why occurs above errors? How to solve it?

Thanks in advance!
Edward

 
Old November 23rd, 2004, 11:41 AM
Registered User
 
Join Date: Nov 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anirbanbasuz
Default

Hi,
This info is not enough. Can you send me the code? I might be able to help you. My ID: anirbanbasuz@yahoo.com

Anirban

Anirban Basu
 
Old December 7th, 2004, 05:41 AM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Encounter the same problem and found out it is the version which the code is compiled.
Problem is that when you run the code in jdk 1.3. - It will not run as it had been compiled in jdk 1.4.

In order to resolve this problem,
1. java -target 1.3 <pgm Name>
2. rmic -v1.3 <pgm Name>

This will resolve the problem.







Similar Threads
Thread Thread Starter Forum Replies Last Post
First RMI Program Pratik_Garg J2EE 1 April 4th, 2006 03:41 AM
RMI newbie NickTheBubble J2EE 0 December 17th, 2004 07:59 AM
java.rmi.UnmarshalException malar J2EE 1 August 10th, 2004 07:27 AM
isbn 81-7366, how to run rmi pgm sivapmk J2EE 1 December 10th, 2003 09:28 AM
Problem running RMI melida J2EE 0 September 23rd, 2003 09:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.