This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 194086 - Cannot compile Sun's JavaPurse sample in NetBeans IDE.
Summary: Cannot compile Sun's JavaPurse sample in NetBeans IDE.
Status: NEW
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: onkentes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-06 13:55 UTC by Benjamin_Gittins
Modified: 2012-08-01 08:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sun's sample organised as 2 NetBeans IDE projects. (40.29 KB, application/octet-stream)
2011-01-06 13:55 UTC, Benjamin_Gittins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin_Gittins 2011-01-06 13:55:32 UTC
Created attachment 104761 [details]
Sun's sample organised as 2 NetBeans IDE projects.

Hi, 

I am trying to get the Sharable interface working across two applet packages.
I came across several problems in my own project, and decided to compile Sun's JavaPurse example to figure out what i was doing wrong:

Javacard_3_0_2_Classic/samples/reference_apps/PurseWithLoyalty/*

I created a first netbeans project "JavaLoyalty" - > Java Card 3 -> Classic -> Library
copied in the JavaCard_3_0_3 sample src code.
I compiled and got the following error message generated by the packager

"[Error] Only one package is allowed in a classic applet or classic library?"
--> I don't understand why the SUN/Oracle example applet does not compile? 

I created a second netbeans project "JavaPurse" - > Java Card 3 -> Classic -> Applet
copied in the JavaCard_3_0_3 sample src code.
In project properties, dependencies, added a library, project type, "Java Library", Deploy to Card strategy
In project properties, Applets, click JavaPurse, set instance to 0201

Assuming you just have one package in an applet then the next problem is that Sharable Interface handling doesn't work.  That is, the Packager does not know where to find the SIO.exp files from the classic library. I have tried many things to help the packager find the SIO.exp files, including toggling flags and manyally copying the SIO.exp to various locations, and can't make it work. 

I could not test this sample code in 6.9.x or 7.0.0 beta because of the following bug
http://netbeans.org/bugzilla/show_bug.cgi?id=189912 

I have included my basic setup for those 2 projects so the problem can be reconstructed quickly.

---
Please. Can a technician supporting NetBeans go through, compile all the java card sample code provided by Sun, and make sure it works in the IDE.  

Then, after performing this regression testing, publish those samples as NetBeans projects so we don't have to go through the learning curve to figure out how to setup the NetBeans IDE properly by brute-force testing all combinations.

I think the NetBeans Java Card support looks very promising, but it is extremely hard to use at this point in it's development cycle.
Comment 1 Benjamin_Gittins 2011-01-06 14:36:24 UTC
I just checked. The JavaLoyalty sample code for javacard_2_2_1 also appears to require the same two packages in one .cap file.
Comment 2 Marian Mirilovic 2011-02-11 11:21:53 UTC
not a stopper for NB 7.0 Beta 2
Comment 3 Adam Sotona 2011-02-16 11:16:26 UTC
right, this is not a high-priority issue
Comment 4 901579 2011-12-17 20:53:50 UTC
While working through the articles "An Introduction to Java Card Technology 1, 2 and 3", see [http://www.oracle.com/technetwork/java/javacard/javacard2-138597.html.] I have encountered the exact same problem as described here, see thread at [https://forums.oracle.com/forums/thread.jspa?threadID=2319924]. Very frustrating! Does anyone know of any updates, patches, workarounds available?
Comment 5 J Bachorik 2012-08-01 08:41:49 UTC
changing owner