LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   OpenJDK 7 problem with Swing GUI apps on Slackware64 13.37-current (http://www.linuxquestions.org/questions/slackware-14/openjdk-7-problem-with-swing-gui-apps-on-slackware64-13-37-current-927237/)

ivanp84 02-02-2012 02:33 PM

OpenJDK 7 problem with Swing GUI apps on Slackware64 13.37-current
 
About two weeks ago I updated my S64 to current, and new glibc allowed me to upgrade all new cool packages from AlienBOB's repository. So I decided to upgrade java, since as biochemist, using tens of tiny, command-line, bioinformatic java apps, and just a few with GUI. And there is a problem, GUI apps, such as Jmol and Toxtree cannot create proper graphical interface under OpenJDK 7 framework, but works excellent under JDK6 from Slackware /extra. Somehow OpenJDK7 cannot render correctly Swing containers layouts, it's obvious that layout manager classes are buggy, sorry bun I cannot find any better name for it.
I'm very curious are anybody experiences same problems with OpenJDK7? If someone knows the solution, please post it here.
This is how Jmol looks like here http://i44.tinypic.com/ib9wrl.jpg
And I asked Eric about the problem on his slackware blog: http://alien.slackbook.org/blog/open...cles-binaries/

Ivan

Alien Bob 02-04-2012 08:10 AM

I tried again today with OpenJRE installed and also with OpenJDK installed.
The Jmol application looks OK and works as expected - see the screenshot in my blog post.

What I did to test this, was just to download "Jmol-12.2.14-binary.zip", unzip the archive, "cd" into the Jmol directory which gets created and run
Code:

sh jmol.sh
to start the application.

For the example in the screenshot I used an example model by loading the following URL in Jmol:
Code:

http://cactus.nci.nih.gov/chemical/structure/tylenol/file?format\=sdf&get3d\=True
The output in the terminal did not show anything strange:
Code:

splash_image=jar:file:/home/xxx/Downloads/jmol-12.2.14/Jmol.jar!/org/openscience/jmol/app/images/Jmol_splash.jpg
history file is /home/xxx/.jmol/history
1822 script command tokens
(C) 2009 Jmol Development
Jmol Version: 12.2.14  2011-12-13 21:20
java.vendor: Oracle Corporation
java.version: 1.7.0_147-icedtea
os.name: Linux
memory: 10.3/30.7
processors available: 2
useCommandThread: false
User macros dir: /home/xxx/.jmol/macros
      exists: false
  isDirectory: false

No idea why it won't work on your system.
My OS: slackware64-current.


Eric

ivanp84 02-04-2012 09:27 AM

Thanks Eric! Acetaminophen (paracetamol) is my favorite small molecule example, also favorite friend of my maxillary sinuses during these 'Snowmageddon' days. :-) Now OpenJDK works, and I think that my problem was overlooked the fact that I had installed every package from yours ./openjdk/pkg64/. Today I removed all of them, and then installed by hand in order first jdk, then jre, icedtea-web, ... When I have many packages I often automate installation like this
Code:

for pkg in $( ls *.t?z ); do installpkg "$pkg"; done
Now I think that A-Z order of installation messed up doinst.sh procedures. Just suggestion, I haven't take a look at scripts, just used binaries.
I will mark this thread as solved, but even OpenJDK works now for me, I really don't know why it was messed before.

mlpa 04-25-2012 03:34 PM

I am experiencing the same problem.
It is necessary to install jdk and jre package?

I usually only install jdk :S

Alien Bob 04-25-2012 03:49 PM

Only install one of the two. If you install both, they bite.

Eric

gargamel 04-25-2012 03:58 PM

Quote:

Originally Posted by Alien Bob (Post 4663000)
Only install one of the two. If you install both, they bite.

Eric

They should not. Actually, it's quite common on *other platforms* to install both, sometimes even in different versions. To run applications, JRE is used, and only development environments and applications servers would rely on the JDK. Of course, they bite, if the executable files have the same name and paths.

EDIT: Rather, one of them will be bitten on the first update of the other one. ;)
EDIT: After all, it shouldn't be a problem, as long as you don't want to install different versions in parallel. Just install the JRE, if all you want is to run Java applications and applets, and go for JDK if you are a developer. The JDK includes a runtime environment.

gargamel


All times are GMT -5. The time now is 05:12 PM.