Qt Jambi application and different operating systems - java

I'm starting to develop my new study project. Because I want and need to run it on different platforms (Linux and Windows) I decide to use Java. Also, because I want to learn something new - I have decided to use Qt Jambi. And here are my problems and doubts. I think that most of it are because I do not understand everything clearly... ;) For now, I develop my application mostly in .Net, and few in Java Swing.
Firstly, I'm using Windows 7 64bit and I want to develop most time on this system. So I've installed the new Eclipse Helios 64bit and Jave SE 64bit. And here is the first concern and problem:
1. It can be stupid, but if I'm using such a configuration, my application will be 32bit or 64bit? :)) It must be 32bit, 64bit can be an option...
2. I've download the Qt Jambi 4.6.3 from this site: http://sourceforge.net/projects/qtjambi/files/ and I can't run it... I've got such error:
java.lang.ExceptionInInitializerError
at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:60)
Caused by: java.lang.RuntimeException: Loading library failed, progress so far:
Unpacking .jar file: 'qtjambi-win32-msvc2005-4.6.3.jar'
Checking Archive 'qtjambi-win32-msvc2005-4.6.3.jar'
- skipping because of wrong system: trying to load: 'win32', expected: 'win64'
From this description I thought that the 64bit java and 32bit Qt is a problem. Because there is no Qt Jambi 4.6.3 for 64bit windows I've installed the 32 bit Java SE and Eclipse simultaneusly. But this do not help.
On the other hand, I found 64bit Qt Jambi from Nokia site - the last version with their support and everything works (only Qt Jambi.exe file not run, because could not find the jvm.dll, which is also strange....
What I want is to develop 32bit application in Java with newest stable Qt Jambi (4.6.3) which will run on Linux and Windows (both 32 and 64bit), and I'm developing in on 64bit Windows. My other questions are:
1. From documentation I understand that I need qtjambi.jar and the second one specific for each system because of C++. Is there any way to include all and make application to choose the right one during start up or intallation?
2. And for people developing in Qt - is better to use Eclipse plugin or to use Qt Creator and then juic ?
3. Some recommended books / tutorials will appreciate.
Thank you for patience to read that and for any answers :)
MichaƂ

I had this same problem. To get it to work I have to remove the 64-bit java installations of Java 6 Update 22 and Java SE Developement Kit 6 update 22. Once I removed these Eclipse helios new that it should use the 32 bit java stuff.

Related

32 bit Eclipse: JRE and JDK versions needed

Apologies in advance. I know this is a basic question.
I am new to server administration. I am administering a server where the users do Java development.
They have a Java-based application and do development in Eclipse. Eclipse is 32-bit. The OS is 64-bit.
I recently updated the JDK and JRE on the server. I have both the 64-bit and 32-bit of each installed.
Eclipse ran into an error where it couldn't start after I had updated to the new JRE and JDK. So I took some advice online and updated the -vm path in the Eclipse .INI file to point to the new 32-bit JRE path. It now works.
I have two main questions:
Will updating the JRE and JDK EVER cause an issue with development, or as long as they can open up Eclipse and use at least one version of the JRE or JDK, they will be fine? I guess my fear is that they are going to develop in a certain version and the next version will cause issues down the line.
They develop in 32-bit Eclipse (not sure why they chose 32-bit) but their application runs with 64-bit Java (that is where the path points to for that installation). If something is developed in 32-bit Eclipse can it run with 64-bit Java? Side question: is there a certain advantage with developing with 32-bit Eclipse on a 64-bit system or is it personal choice?
Thanks a lot and cheers!
I guess my fear is that they are going to develop in a certain version and the next version will cause issues down the line.
Java 6 and 7 are end of life; Java 8 code should still be run when Java 9+ rolls out. I've not been aware of any backwards compatibility issues in recent years, it's only forward compatibility that doesn't work (running Java 8 compiled libraries with JRE 7).
They develop in 32-bit Eclipse (not sure why they chose 32-bit) but their application runs with 64-bit Java
The IDE and code run in separate processes. There's no harm in using the 64bit JDK with 32bit editor.
Eclipse 32 bits running on 64 bits JVM
Should I use Eclipse 32bits or 64bits on my new machine?
Will updating the JRE and JDK EVER cause an issue with development...
I believe it technically could render what you developed "obsolete" if you're initially using one JDK with some specs and change for another one with specs that are not "compatible" with what you built so far. By specs, I mean the libraries, tools, etc that the JDK contains. But I would say it would be unlikely that such problems occur. It personally never happened to me. I'd like to have someone with more knowledge give more details though and validate what I'm saying or correct me if I'm wrong.
If something is developed in 32-bit Eclipse can it run with 64-bit
Java?
To my knowledge, there are not related things. In my mind, Eclipse is just your IDE and it allows you to build/compile code using specific JDK (32 or 64 bits). As a matter of fact, you don't even need eclipse to build code but you definitely need a JDK: it's the JDK that give you the tools to compile code that "targets" a specific JRE/JVM and Eclipse is using the tools your JDK provide.
So yes, you can use eclipse 32 bits to build code for a 64 bits JRE.

Netbeans project properties doesn't list my remote platform

I am trying to develop a java SE application on a Raspberry Pi, using NetBeans. I have created a platform for the Pi using the Platform Manager, and the platform verifies ok; however, in project properties>Run>Runtime platform, the only option listed is "project platform", despite that fact that when I click "manage platform" next to it, my platform shows up fine.
Does anyone know what could be causing this? I have a feeling something might be misconfigured, or maybe I'm using the wrong type of project or something, but notihng I try seems to work. The project is just a simple java application (created with new project>java>java application), and I am using the latest version of Raspian on the Pi, with the preloaded java installation, located at /usr/lib/jvm/jdk-7-oracle-armhf/jre.
Any help is greatly appreciated.
I had the same problem yesterday, and I solve it!
Main reason is: you need the same JDK for NetBeans and Raspberry.
I use Raspberry PI 3+ (64 bit) with Debian OS (32 bit), JDK 8 has support for ARM 32 bit, I downloaded the last version: "jdk-8u271-linux-arm32-vfp-hflt.tar.gz".
https://www.oracle.com/it/java/technologies/javase/javase-jdk8-downloads.html
Unfortunately, JDK 15 hasen't the 32 bit ARM version...
I also installed the JDK 8 in Windows with NetBeans: "jdk-8u271-windows-x64" and then, you need to change the default JDK in the .conf NetBeans file.
https://www.codejava.net/ides/netbeans/change-jdk-for-netbeans
Now, when you open Properties/run/ you can select the remote platform.
Enjoy,
Best Regards.
Marco

how to start NetLogo with java7 under OSX mavericks?

I have just installed osx mavericks, and Java SE6 just disappeared from my system... anyway, I already have Java SE7 and I am happy with that, no need to reinstall Java SE6 since my NetBeans already works on Java7 and NetLogo too if I start it from terminal...
I am wondering how to tell the plist file of my NetLogo 5.0.4 to look for the JavaSE7 folder... any help much appreciated.
Best,
Simone
Answer
You might think that changing "1.5" to "1.7" in these Info.plist lines:
<key>JVMVersion</key>
<string>1.5+</string>
would work, but it doesn't. That's because Java 6 is from Apple but Java 7 is from Oracle, and "Apple java applications and Oracle's aren't executable compatible" (source).
Unless you want to mess with making a new NetLogo app bundle using Oracle's AppBundler tool, the simplest way to get the app running under Java 7 is to download the Linux version of NetLogo and use the supplied netlogo.sh launch script.
More info
When running headless, NetLogo has been tested thoroughly on Java 7. For headless runs, I definitely recommend Java 7 because it's faster.
The NetLogo GUI, however, hasn't been tested with Java 7. Once you get it launched, it will probably mostly work, but you might have problems or incompatibilities. We'll probably switch eventually (it's issue 197), but the work on that hasn't been done yet. That ticket would be a good place to record any problems that you find.
If you decide to fall back to Java 6, you can get it from http://support.apple.com/kb/DL1572 . (link is current as of October 2013)

Where is plugin.jar for Java 7 for OSX

If you're using Java < 1.7 on OS X and you need to use JSObject for connecting an applet to JavaScript, you can find it in in $JAVA_HOME/jre/lib/plugin.jar.
The "plugin.jar" archive doesn't seem to exist on Java 1.7 for OS X (as packaged by Oracle). There is a jfxrt.jar that seems to contain JSObject, but that unfortunately means that you can't use the same plugin.jar that you can on almost any other JDK, including 7u5 for Linux, which still has plugin.jar built right in.
In particular, this gets irritating if you're trying to use it as a compilation dependency for a build tool such as Maven, which you could otherwise do with a JAVA_HOME-relative path.
Java 7 on Mac OS X doesn't support the Java plugin. So, plugin.jar is simply not there. If you manage to find the Java 7 installation guide for Mac OS X on Oracle's website (good luck with that) you'll see:
Note that for the 7u4 release, Java plugin and Java Web start applications are not supported.
And, yes, 7u5 is out, but its release notes say it's just a bug and security fix. I'm assuming Oracle just didn't bother to update their installation notes. It looks like the 7u6 developer preview does include the plugin, so at least it's on its way.
The jfxrt.jar file is for Java FX, which is included in the Oracle Java 7 Mac OS X release. Of course, Java FX is built on top of Java applets and is intended to run via the Java plugin, so don't ask me why it would be included in Oracle's Mac OS X Java 7 release while the Java plugin itself isn't. (I guess you can build Java FX apps, you just can't run them?)
The real answer appears to be "don't use Java 7 on Mac OS X quite yet." Which may be one of the reasons Oracle extended the Java 6 EOL until November.
Plugin.jar is available on Java 7u6 for OS X, now available.

JAVA 1.5 in OSX 10.6.4

I am trying to debug a j2ee application in tomcat using Intellij Idea in an OS X 10.6.4 system. I need it specifically to run over a 1.5 JVM and 1.5 JDK so that the jgroups-all component doesn't crash the application through this error:
class: java.lang.ClassNotFoundException: [Lorg.jgroups.Address;
at com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener.initialize(JavaGroupsBroadcastingListener.java:119)
Has anyone needed to install an older version of JVM or JDK in OS X before?
NOTE: I'm a Mac newbie.
Thanks, everyone.
Well, as far as I know you should be able to choose an older VM in the Java control panel, although I think Apple removes old JREs by default now.
Did you consider Apple's Java Deprecation before starting you project? It looks like you will be out of luck in the near future. If Apple doesn't even want to support some recent JRE anymore it is unlikely that they will offer old, unsupported ones, which even Oracle ended support for.
Even if Oracle will provide some JRE/JDK for Mac OSX it is highly unlikely that they will back-port some Java 5 to Mac OSX. Your best bet is to migrate your application to a version which is supported first, before doing any other steps.
Try the solution here.

Categories