You are here

64-bit Portable Java

8 posts / 0 new
Last post
cosmik
Offline
Last seen: 14 years 2 months ago
Joined: 2009-12-22 07:59
64-bit Portable Java

Hello,

I have read many posts regarding the support of 64-bit platforms by Portable Apps, but most of them I think revolve around compatibility of 32-bit applications.
Here we are facing a particular challenge: our portable Java application relies on JNI programs for specific integration with the host (mail, smartcards, etc.) which in turn rely with host specific programs.

When these specific programs are compiled for a 64-bit host, then we have to recompile our JNIs in 64-bit and thus we need A 64-BIT PORTABLE JAVA RUNTIME ENVIRONMENT !!!

Are there any plans for this ?

Thanks and regards and merry christmas to all.
Cosmik

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 8 months ago
Joined: 2007-04-15 21:08
No such thing

There seems to be no such thing as a 64-bit JRE for Windows. It's just the plugin which is 64-bit, so you can use it on IE 64-bit. Java Portable does not support or use browser plugin usage, so as I see it there's nothing to be done with it.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

cosmik
Offline
Last seen: 14 years 2 months ago
Joined: 2009-12-22 07:59
Then how do you explain this
Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 8 months ago
Joined: 2007-04-15 21:08
Plugin

I haven't downloaded it to check it, but from my reading on the subject and from their main download page, I believe it's just the browser plugin which is different.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Bruce Pascoe
Offline
Last seen: 12 years 1 month ago
Joined: 2006-01-15 16:14
Which would make sense...

...since Java is meant to be cross-platform, even in bytecode form. It therefore wouldn't make sense to have a compiler that generated bytecode you could only run on a 64-bit machine.

cosmik
Offline
Last seen: 14 years 2 months ago
Joined: 2009-12-22 07:59
It is discouraging in such a

It is discouraging in such a forum to make the effort to clearly explain a problem without anyone paying attention. I mentioned JNI. If you guys believe Java is just a simple language for doing basic stuff, only then can I understand your point.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 18 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
32-bit

cosmik, there's really no need to compile it as 64-bit. While Java is bit-neutral, it isn't when calling or being called by native code (C/C++) as you mentioned. But you're also talking about various host programs being initiated and, if that's the case, then your app isn't portable anyway, in which case the point is moot.

Everything portable is generally done in 32-bit as it then works on 32-bit and 64-bit Windows. The only exception is with specific drivers or system-level calls (like JkDefrag portable so it can properly interface with Windows' defragmentation system). Everything else should be 32-bit. Really, at that level, an app requires admin rights which makes it not as portable... so the exception is only made for specific sysadmin utilities which are broadly used by folks portably.

As for Java, a 64-bit Java would be a highly niche product. *ALL* the Java apps we're doing work fine both 32-bit and 64-bit, so there's no need to do a 64-bit install of Java. It would over-complicate things and double the size of the JVM install (since you can't just have the 64-bit one because nearly all PCs you encounter will be running a 32-bit OS even when they have 64-bit capable processors in them).

There may be a call for your specific need for a 64-bit and 32-bit JVM install, in which case you are free to persue that. But, at the platform and general user level, 64-bit Java in portable form is a complete non-starter.

Unless you can describe your specific product in more detail and how a wider user audience needs it, that will not change.

Sometimes, the impossible can become possible, if you're awesome!

Jerem10
Offline
Last seen: 13 years 10 months ago
Joined: 2010-04-15 08:43
64 bits

Hello,

I have the same "problems" with Java 32 / 64 bits.

Our products need to load JNI that use drivers which manage cryptographic devices like smart cards, or to access to native system features like Microsoft CSP. The JNI and the drivers (or other native librairies) must be in the same architecture (full 64-bit, or full 32-bit) to work correctly.

The problems are the following:
- 64-bit Java cannot load 32-bit JNI
- 32-bit Java cannot load 64-bit JNI

When some drivers or native librairies are only in 64-bit, our JNI must be in 64-bit, and the app cannot run when we use a 32-bit JRE to load a 64-bit JNI.

We solved the problem by installing the Sun 64-bit JDK as a normal install and we copied the content of the "jre" directory in a /CommonFiles/Java_64/ directory. Finally, we detect the OS architecture by using environment variables and we use the corresponding JRE to launch our apps. It works, but a PortableApps Installer would be better to do it, specially for JRE updates.

I think it could be useful to have a separate 64-bit Portable JRE Installer, in addition of the 32-bit Portable JRE Installer.

Thanks in advance,

Jeremy

Log in or register to post comments