Hi John,

Your problem comes from improper use of CLASSPATH.
Classpath should contain directories and jar files
(not single class files).
In the case of directories, the directory should point
to the root of your package hierarchy. Say, if your
package is com.sun.javacard.NullApp, you should
locate your class file in:

%mydir%\com\sun\javacard\NullApp\NullApp.class

and your classpath should include ane entry %mydir%:

CLASSPATH=%CLASSPATH%;%mydir%

Your sentence...

  I:\jc21\bin>java  -classpath
 
I:\JDK\LIB;I:\JRE\LIB;I;i:\JC21\bin\jcwde.jar;i:\JC21\bin\NullApp.java;i:\JC
  21\bin\api21.jar;i:\JC21\bin\NullApp.class;i:\JC21\bin\apduio.jar
  com.sun.javacard.jcwde.Main   JP.cfg

...is too overcrowded.

You don't have to include "I:\JDK\LIB;I:\JRE\LIB;" in your classpath if you
use Java2 (aka JDK 1.2.x).

You don't need "i:\JC21\bin\NullApp.java;i:\JC21\bin\NullApp.class" either.
You use their package hierarchy root directory I was indicating before
instead.

If you don't want so much dir. depth, move NullApp to the "default" package
(don't include a package declaration in NullApp.java, and use the location
of NullApp.class directly in your classpath).

Hope it helps,
C A R L E S
---
  Carles Barrob�s i Meix 
  Marketing & Development
  GyD Ib�rica - Giesecke & Devrient
  Ind�stria 5
  E-08970 St. Joan Desp� 
  Tel +(34) 934808303  Fax +(34) 934771142
  mailto:[EMAIL PROTECTED]  http://www.gyd.com/



> -----Original Message-----
> From: John Brookman [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, July 28, 1999 7:37 PM
> To:   [EMAIL PROTECTED]
> Subject:      [OCF] Java Card Problem
> 
> Hi there!
> 
> I am DESPREATE for some help... [just like most of us ;-)]
> (this problem has been bugging me for the past 1.5 months.)
> 
> This message concerns a problem using: JDK, JRE and JC21
> (all versions up-to date).
> 
> I am able to do the following:
> 
> - Run and Test (using the script files) the JC21 samples (< As described
> in
> the UserGuide)
> - Compile the NullApp.java to NullApp.class myself (this file is included
> in
> the samples-source directory)
> 
> However, I am unable to actually USE the NullApp.class. [which I compiled
> myself] I removed the samples.jar file from the jcwde.bat command line and
> I
> inserted the location of the NullApp.class instead [and even tried to
> first
> put that NullApp.class in a .jar file and then try again with puttin the
> .jar file in the command line].
> 
> Unfortunately I receive the following error:
> 
> ---------------
> I:\jc21\bin>java� -classpath
> I:\JDK\LIB;I:\JRE\LIB;I;i:\JC21\bin\jcwde.jar;i:\JC21\bin\NullApp.java;i:\
> JC
> 21\bin\api21.jar;i:\JC21\bin\NullApp.class;i:\JC21\bin\apduio.jar
> com.sun.javacard.jcwde.Main�� JP.cfg
> 
> [^^^ this is the command I use. JP.cfg is the correct file, containing the
> NULLAPP 'reference' ONLY!]
> 
> 
> JavaCard 2.1 Workstation Development Environment (version 0.4).
> jcwde is listening for T=0 Apdu's on TCP/IP port 9,025.
> java.lang.ClassNotFoundException: com.sun.javacard.NullApp.NullApp�����
> [<<<
> Main ERROR, I guess...]
> jcwde terminating on receipt of SimulationException.� See previous
> messages
> for
> cause.
> Exception in thread "main" com.sun.javacard.jcwde.SimulationException
> ������� at
> com.sun.javacard.jcwde.MaskedApplets.getInstallInstance(MaskedApplets
> .java)
> ������� at
> com.sun.javacard.jcwde.SimPrivAccess.getROMApplet(SimPrivAccess.java)
> 
> ������� at
> com.sun.javacard.impl.NativeMethods.getInstallMethod(NativeMethods.ja
> va)
> ������� at com.sun.javacard.impl.PrivAccess.initialize(Compiled Code)
> ������� at javacard.framework.Dispatcher.cardInit(Dispatcher.java:225)
> ������� at javacard.framework.Dispatcher.main(Compiled Code)
> ������� at javacard.framework.JCWDEDispatcher.main(JCWDEDispatcher.java)
> ������� at com.sun.javacard.jcwde.Main.run(Main.java)
> ������� at com.sun.javacard.jcwde.Main.main(Compiled Code)
> 
> I:\jc21\bin>
> --------------------------
> 
> Well, that;s it. I receive NO errors when compiling the NullApp.java like
> this:
> javac -classpath %JC21_HOME%\bin\api21.jar NullApp.java
> [^^ Is this the correct way!?]
> 
> To complete this message, I will include my settings:
> 
> ----------------SETTINGS----------
> REM ------- JAVA CARD (BEGIN) ---------
> SET JC21_HOME=i:\JC21
> Set
> PATH=%PATH%;I:\JDK\BIN;I:\JDK;I:\JRE\BIN;I:\JC21\BIN;D:\PROGRA~1\BORLAND\D
> EL
> PHI4\BIN
> SET JAVA_HOME=I:\JDK
> set jc21bin=I:\jc21\bin
> set CLASSPATH=I:\JDK\LIB;I:\JRE\LIB
> REM -------� JAVA CARD(END)� ---------
> ----------------SETTINGS----------
> 
> Can you help me, please?
> 
> Thank you in advance,
> John Brookman
> �
> �
> P.S> If you think my settings, etc are correct, please respond as well...
> 
> 
> 
> 
> 
Visit the OpenCard Framework's WWW site at http://www.opencard.org/ for
access to documentation, code, presentations, and OCF announcements.
-----------------------------------------------------------------------------
To unsubscribe from the OCF Mailing list, send a mail to
"[EMAIL PROTECTED]" with the word "unsubscribe" in the BODY of the
message.

Reply via email to