Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Read and write data on a smart card

  Asked By: Richard    Date: Apr 22    Category: Java    Views: 2039

i am using oracle developer forms to read and write my data on a smart card.
i am using dlls in windows platform for this purpose.
but now i wanna use the dlls on unix platform.
i have heard that ý can do it by a java bean.

Is there anyone who has tried to do is ? and tell me how??



10 Answers Found

Answer #1    Answered By: Eline Bakker     Answered On: Apr 22

You've been misinformed. A JavaBean itself is platform  independent component.
But you cannot use a
DLL in Unix using a JavaBean. There's a Windows emulator for Unix/Linux called
Wine. I've not used
it myself, but if you subscribe to its mailing list and ask your question there
with more details
you may be able to find a solution for your problem.

Answer #2    Answered By: Harriet Hughes     Answered On: Apr 22

just my curiosity, what is a dll on unix? Im totally lost.

Answer #3    Answered By: Blandina Garcia     Answered On: Apr 22

If you have the source code, you should be able to use Java ActiveX bridge. it works both ways.

Winmain could be another option

Answer #4    Answered By: Addison Campbell     Answered On: Apr 22

> If you have the source code, you should be able to use Java ActiveX bridge. it
works both ways.

According to ActiveX Bridge's Product Page:

"The ActiveX Bridge allow a component based on JavaBeans(TM) component
architecture ("bean") to be
effectively packaged as an ActiveX control, thereby allowing it to be used as a
component in an ActiveX container."

So this doesn't seem to be an option (using a DLL inside Linux).

> Winmain could be another option

WinMain? Could someone use a DLL in LINUX with the help of WinMain!?

Answer #5    Answered By: Aaleyah Khan     Answered On: Apr 22

There is no dll on unix. If you mean from an
arvhitectural view. It is similiar to so files wich
stands for Sharable Object. And it works as it

Answer #6    Answered By: Marta Kim     Answered On: Apr 22

IF you have the source code, Yes winmain can be helpful.

if your code has Microsoft Macros and APIs all over the place, Winmain will port it to a target platform  which in your case is Linux

if the code is (considering it's written in C family) Ansi compliant, you can port the code into a posix based environment and build a shared object. This is in a case that you are not keeping the source platform though, otherwise interfacing to the original platform was the best way.

I have used Java ActiveX bridge to convert POJO to .tld (DLL control) but I imagined it could do the reverse as well, it's a bridge after all. If you say it doesn't do it, no argue with that. wasn't too sure anyway. but I thought I've seen somewhere in it's notes. worth checking

Answer #7    Answered By: Shaun Thomas     Answered On: Apr 22

I have a problem in j2ee, I'm doing a project writing an email

system, when i want to send a mail, I have this error:

java.rmi.UnexpectedException: Unexpected exception in

javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 Unable to relay

this is my method for sending mail:

public void sendMail(messageVO msgVO) throws Exception

javax.naming.InitialContext ctx = new

javax.mail.Session mail_session = (javax.mail.Session)

/* java.util.Properties props = new java.util.Properties();
props.put("mail.smtp.host", "localhost");
props.put("mail.smtp.port", ""+25);
Session session = Session.getDefaultInstance(props,

MimeMessage msg = new MimeMessage(mail_session);

msg.setFrom(new InternetAddress(msgVO.fromAddress_VO));

Store store = mail_session.getStore();
Folder f = store.getFolder("Sent");
if (!f.exists()) f.create(Folder.HOLDS_MESSAGES);
f.appendMessages(new Message[] {msg});

mailSessionHome mailSesHome = (mailSessionHome)

("ejb.mailSessionRemoteHome",mailSessionHome.class );
mailSessionRemote mailSes = mailSesHome.create();

mailFolderVO mailFldVO = mailSes.findOrCreateOutbox();


Answer #8    Answered By: Akins Massri     Answered On: Apr 22

Follow the trace below, you might find it useful. apparently someone has already resolved it here:


Answer #9    Answered By: Sally Pierce     Answered On: Apr 22

I had encountered this problem a few months ago and it turned out that the problem is with the SMTP server which did not allow relaying.

Have a look at this FAQ entry for more details: java.sun.com/products/javamail/FAQ.html#norelay

Answer #10    Answered By: Erma Henry     Answered On: Apr 22

Seems the mail server you are trying to use for sending the mail is not open relay. Check its configuration and add localhost to trusted hosts ( not for peroduction!)

Didn't find what you were looking for? Find more on Read and write data on a smart card Or get search suggestion and latest updates.