Java Window Translucency on Linux - java

Using Java 7 window translucency on Windows XP SP3, Vista, 7, 8 and Mac OS X Mountain Lion works great. However, on Linux I cannot get it to work properly.
Using the tutorial found here, specifically the GradientTranslucentWindow example, it seems to work great. But if you change the color to something other than white (the only change I made was set R to 0 in the example code), the frame does not composite correctly:
The isWindowTranslucencySupported method returns true for PERPIXEL_TRANSLUCENT. I'm running Ubuntu 12.04 LTS 32bit with Compiz composite manager with the Composite plugin turned on.
Questions:
What can I do to get this to work? Is it a Linux setting that needs to be changed, a java code change, or what?
Is anyone else having this problem? Java 7 has been out for some time now, but I can't find anyone else having this problem. There are some bug reports in the Java bug database, but they are all "fixed". I have submitted a bug to the Java bug database, but it has yet to appear on the external database.
I'm running Ubuntu under Oracle VirtualBox. Could this be the problem? Sadly, I do not have a machine to install Linux on, so can someone else that is running a non-vm linux try this? EDIT I have the guest add-ons installed.

VirtualBox was indeed the issue (even with guest add-ons). Running a non-vm'ed Ubuntu with proprietary graphics card drivers allows the sample to work as expected.

Related

Error opening matlab due to Java error

I was trying to simply open matlab I had a java exception. I didn't do anything except probably update java automagically. Has anyone had this problem before?
This is on MAC OS, yosemite.
Error message:
That particular error is due to installing a version of MATLAB that was released before the release of Mac OS Yosemite. Specifically, if you were running a version of Mac OS that is prior to the release of Yosemite, and then you decide to upgrade to Yosemite, you will generate this error when trying to run MATLAB after the fact.
It is a well-known bug that has unfortunately plagued a lot of Yosemite users.
If you consult this particular MathWorks thread: http://www.mathworks.com/matlabcentral/newsreader/view_thread/336387 , upgrading to Yosemite while having such a version of MATLAB will generate a java.lang.NullPointerException on startup. Fortunately, MathWorks has released a patch to patch up your MATLAB so you can get it running again.
See this link for more details on patching up your MATLAB program.
http://www.mathworks.com/support/bugreports/1098655
Make sure you download the right patch that corresponds to the MATLAB version you have.
yes i had this problem two or three years ago. if you use windows 7 aero theme, then you will get this error. Set the theme windows default, then try to open again. Otherwise please share your os and matlab version with us.

Installing jdk meant for linux on OS X

I was trying to find a download for jdk 1.6 specifically for OS X. But Oracle doesn't seem to offer one. This made me wonder if the jdk 1.6 meant for Linux would work fine on OS X. I could try running it to see if it works. But I thought I'd check here to see if there are any subtle or not-so-subtle issues that I've missed.
I have an AMD-64 architecture on my mac system.
Java 6 for Mac is provided by Apple rather than Oracle, and can be downloaded from http://support.apple.com/downloads/#Java - look for the latest "Java for OSX", which at the time of writing is 2014-001.

Trouble with Browser type SWT.MOZILLA on windows 8 64 bit

after spending a day reading here and there I decided to ask help as I could not find a solution to my problem.
I have to create a java/swt application embedding a browser with full HTML5 support. That works out of the box on both linux and osx with SWT.NONE browser type (using webkit).
Unfortunatelly I have lot of troubles on windows.
First let me say that I'm using SWT 4.2.x on windows 8 64 bit.
To make SWT browser work with webkit I had to install 32bit JVM and manually point to it (as the -d32 switch on default 64bit JVM says that no 32 bit JVM is installed). ALso installed Safari.
And also I had to use 32bit SWT library. WHen finally I got it run I discovered that Safari for windows does not support drag and drop as experienced and stated here:
http://www.w3schools.com/html/html5_draganddrop.asp
So I decided to switch to mozilla. According to Eclipse/SWT documentation I have downloaded and installed XULRunner 1.8.0.1. I have unzipped it into C:\Program Files (x86)\Mozilla\XULRunner\1.8.0.1\xulrunner and run xulrunner --register-user (and also --register-global)
Finally in my code I added
System.setProperty("org.eclipse.swt.browser.DefaultType", "mozilla");
I have also set a global environment variable "MOZILLA_FIVE_HOME" pointing to the same XULRunner installation dir.
But then, when I run my java program (32bit JRE, 32bit SWT) I get
Exception in thread "main" org.eclipse.swt.SWTError: No more handles [MOZILLA_FIVE_HOME may not point at an embeddable GRE]
How can I fix that?
Thanks in advance!
EDIT:
I was running command prompt not as administrator and xulrunner was not registering. Doing as administrator, worked. However I'm still in trouble: XULRunner 1.9.x seems not to support HTML5. For example element.children is not supported.
I managed installing XULRunner 10.0.2 that seems to have the required support. However as soon as I click into my embedded browser, the application just crashes without printing any error on java output console...
I need to find a solution in order to use either ecent version of mozilla or recent version of webkit on windows
Ok, loading XURLRunner 10.0.2 works. The crashing app was due to a stack overflow error in my js code.
I too am trying to embed XULRunner into my eclipse plug-in, with no luck (currently). I came across your answer here. Just wanted to comment that it is not reasonable that you executed
xulrunner --register-user
nor
xulrunner --register-global
on the XULRunner 10.X since according to this post
https://stackoverflow.com/a/7567781/1743693
the support on installing the XULRunner system-wide was removed (which was a good step IMHO)
Trying to execute the aforementioned commands will result
"Error: couldn't parse application.ini"
As for my problem: I keep running into the runtime error:
Can't load library:
C:\Users\david\.swt\lib\win32\x86_64\swt-xulrunner-win32-4236.dll
C:\Users\david\.swt\lib\win32\x86_64\swt-xulrunner-win32.dll: Can't
load IA 32-bit .dll on a AMD 64-bit platform
And I can't figure out where this is coming from.
I'm running a VirtualBox with Windows 8 64bit
If you can elaborate more on what solved your issue with that - i would really appreciate that.
Thanks.

How can i combat with java update on mac snow leopard

I am using preinstalled jdk for development on mac which is 1.6.0_17. With this version or copy if installed jdk i cannot run java applets in firefox or any other web browser on mac. if i update my mac with latest java which is Java for mac OS X 10.6 update 6 then i can solve java applet. But with latest java update i cannot connect to MSSQL Server which is bug in java 1.6.0_29. I would be happy to install older version of java for mac OS X but those are not available, may be i am unable to find them through google ?
My query is, how can i solve both problems ? can i install two java versions on mac and use them parallely, lets say one for eclipse and other for browser. OR is there any other way to cope both problems.
I am using current snow leopard, myEclipse, Java 1.6.0_17 and mssql server 2008.
The bug that causes the JDBC driver to fail is fixed in java 1.6.0_30 - see http://www.oracle.com/technetwork/java/javase/6u30-relnotes-1394870.html
If you can't wait for update 30 for the Mac to arrive, the bug description suggests that you may be able to avoid it by reconfiguring your the JDBC connection to use a non-SSL/TLS channel. (I've no idea how you'd do that, but it is worth investigating if you are desperate for a workaround.)
Alternatively talk to Apple or Oracle's Java support.
I have not solved it 100% but some how solution or workaround works. Which is working with two javas
Java for mac osx
OpenJDK for development
So i have updated my mac with latest java version that i can easily use java applet.Later i have downloaded and configured openjdk for development.
if you are using mac then perhaps this link would be more helpful .
[1]: http://openjdk.java.net/projects/macosx-port/
[2]: http://code.google.com/p/openjdk-osx-build/
Simply make a folder "javaVirutalMachines" under "/Library/java/" and double click on alreadly download build file of openjdk. **

How to get java 1.6 applet working on mac os x

anyone got java 1.6 applet working on mac os x ?
check it on gemal.dk/browserspy/java.html
I got Java using object and applet tag 1.5.0_16 (1.5.0_16-133) from Apple Inc.
and you ?
on windows and linux 1.6 working gracefully :S
On Leopard, open /Applications/Utilities/Java/Java Preferences.app, and select Java 6 as the default for your applets. This won't work, of course, if you don't have an Intel Mac running Leopard (at least, I think it requires Leopard... perhaps there's an installer for Tiger). In either event, not reliable if you need to deploy 1.6-based applets to users, but works tickety-boo for your own surfing.
There should be an installed Java JRE picker... had a similar road block, give it a peak.
It was a problem with OSX itself that didn't support 1.6 on applets now everything is updated and works on 10.6.6 at least
I wrote it here so somebody don't confuse this problem with another.

Categories