Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Arithmetic operation

PixantLoNov 16 2010 — edited Nov 18 2010
Hello, these days i find a problem with this operations, and I don't find the way to solved it, I think the problem is that i can't use integers in Java Card.

I'm doing divisions with 2, and there's a moment that bits changs because carry I supose,

short temp = (short) (ofini/2);

I tryed to solve it doing that

short temp = (short) ((ofini/2) & 0xF7);

but it don't solve all the numbers i can use with "ofini"that goes to 0 - DD.

Is there any solution? If I solve it i would be able to finish my applet... XD
This post has been answered by Sebastien_Lorquet on Nov 16 2010
Jump to Answer

Comments

807597
Why is Java compiler called as Java Virtual Machine?
It's not, and shouldn't be. The compiler compiles source code into bytecodes.
What does it actually signify by VIRTUAL MACHINE?
The virtual machine is a computer that exists in a software sense only. It is the virtual machine in which bytecodes are executed.

http://java.sun.com/docs/books/vmspec/2nd-edition/html/Introduction.doc.html#3057
807597
The Java Virtual Machine is the cornerstone of the Java programming language. It is the component of the Java technology responsible for crossplatform delivery. Converts bytecode into OS specific commands. In addition to governing the execution of an application's bytecodes, the virtual machine handles related tasks such as managing the system's memory, providing security against malicious code, and managing multiple threads of program execution. The virtual machine sits on top of a native environment (OS) and allows for portability of applications across various hardware as long as the hardware has a virtual machine on it. The JVM knows nothing of the Java language, only of a particular file format, the class file format. A class file contains JVM instructions (or bytecodes) and a symbol table, as well as other required information
-------------------
Andrew Morris
http://www.devsquare.com
DevSquare - Online Application Development
807597
Andrew Morris
http://www.devsquare.com
DevSquare - Online Application Development
Replying to a question doesn't give you the right to advertise. Get lost.
456795
Andrew Morris
http://www.devsquare.com
DevSquare - Online Application Development
Replying to a question doesn't give you the right to
advertise. Get lost.
In my opinion. I see nothing wrong with his signature. Outside of this forum, people all the time put their Name, Position, Company, Address, phone numbers, etc. in their signatures. I wouldn't seeing mind more of it.
807597
In my opinion. I see nothing wrong with his signature.
Ulrika doesn't like signatures.


Love,
Yawmark.
796447
Andrew Morris
http://www.devsquare.com
DevSquare - Online Application Development
Replying to a question doesn't give you the right to
advertise. Get lost.
I agree.

I also want to point out that when I've jabbed at others for doing this, UJ jabbed at me for being a "self-appointed sherrif of Shmucksville".

Hello pot. This is Kettle. You're black.
807597
Replying to a question doesn't give you the right to
advertise. Get lost.
In my opinion. I see nothing wrong with his
signature. Outside of this forum, people all the
time put their Name, Position, Company, Address,
phone numbers, etc. in their signatures. I wouldn't
seeing mind more of it.
From the Sun's rules of conduct you sign when you register:

"2.3 You agree that You will not use the Website to: (a) transmit spam, bulk or unsolicited communications;"

So advertising here is against the rules. It's also bad manners to impose your commersial interests on people who contribute here for free.
796447
From the Sun's rules of conduct you sign when you
register:

"2.3 You agree that You will not use the Website to:
(a) transmit spam, bulk or unsolicited
communications;"

So advertising here is against the rules. It's also
bad manners to impose your commersial interests on
people who contribute here for free.
Yep, agreed.
And although they may not spell it out, there's probably an implicit rule to not create a bunch of alias usernames every week or so either just to bloat the site's databases. But that wouldn't apply to you.
456795
Love,
Yawmark.
Isn't that a signature :)

Personally I don't use Salutation or Signatures. But I don't mind if other do.
807597
So this is bad form then.
796447
www.google.com
It's about time you showed up. Lots of people have been directed to you to find answers. Get busy!
807597
I thought I would let you all know I am reading and listening and participating.

More to come ....



[Yea right]












Before everyone get all flamed. This is just another MIC.
807597
Personally I don't use Salutation or Signatures. But
I don't mind if other do.
Neither do I because posts aren't personal letters. I don't mind either although I think it's totally unnecessary because your forum identity is already known. And it doesn't give the desired effect of friendliness and consideration either. It's more like flashing your private parts in public -:)
807597
It's more like flashing your private parts in public -:)
My ass.
456795
It's more like flashing your private parts in
public -:)

My ass.
What happened to the Love, Yawmark. :)
807597
It's more like flashing your private parts in
public -:)

My ass.
What happened to the Love, Yawmark. :)
He gave directions didn't he. -:)
456795
From the Sun's rules of conduct you sign when you
register:

"2.3 You agree that You will not use the Website to:
(a) transmit spam, bulk or unsolicited
communications;"

So advertising here is against the rules. It's also
bad manners to impose your commersial interests on
people who contribute here for free.
I don't think this applies in this situation. Because Sun allows this in your [url /settings!default.jspa]Forum Settings. There you can put in a homepage such as http://www.google.com or any other url. I will admit that is still one click away and not in you face, but still allowed.
796447
I don't think this applies in this situation.
Because Sun allows this in your [url
l /settings!default.jspa]Forum Settings. There
you can put in a homepage such as
http://www.google.com or any other url. I will admit
that is still one click away and not in you face, but
still allowed.
Well whatever the case may be, UJ is not the self-appointed Sheriff and does not get to decide who posts and who doesn't.

Gee, where have I heard that before?
807597
I don't think this applies in this situation.
Of course it does.
Because Sun allows this in your [url
l /settings!default.jspa]Forum Settings. There
you can put in a homepage such as
http://www.google.com or any other url.
Sure, any information to your liking.
I will admit
that is still one click away and not in you face, but
still allowed.
You can put in whatever information you like in your personal profile and I can read it there if i want to. But that doesn't allow you to spam the forum in your posts. It's against the rules and a nuisance.
807597
What happened to the Love, Yawmark. :)
Inside joke; UJ bared hers day or two ago. I'm simply following suit.
807597
Then we will just have to differ in our opinion. Of course we could wait until Sun rules on it and lets us know besides just deleting the thread.. But I don't think I will live that long.
807597
He gave directions didn't he. -:)
Zing! That's quite possibly the funniest thing you've said, next to the whole "spoon size" comment.

LOL!
807597
Well whatever the case may be, UJ is not the
self-appointed Sheriff and does not get to decide who
posts and who doesn't.

Gee, where have I heard that before?
Say, officer, can I buy you a cup of coffee to go with a side order of hypocrisy?
796447
Say, officer, can I buy you a cup of coffee to go
with a side order of hypocrisy?
Make it a no-caf soda-pop instead, and it's a deal.
456795
Say, officer, can I buy you a cup of coffee to go
with a side order of hypocrisy?
Make it a no-caf soda-pop instead, and it's a deal.
Don't leave me out of it.
1 - 25
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 16 2010
Added on Nov 16 2010
10 comments
196 views