• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

32-bit SWT libraries on 64-bit JVM

 
Ranch Hand
Posts: 574
VI Editor Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been running Java fine on my 2 month old laptop. Until yesterday. I installed TuxGuitar, which is written in Java, but when I run it I get"Cannot load 32-bit SWT libraries on 64-bit JVM". This happens in both my cygwin window and a dos window.

(SuperJimmy) 542 -=> java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
(SuperJimmy) 543 -=>

I'm afraid to uninstall the 64 bit version and replace with the 32 bit version as I don't now what that will break.

How do I fix this?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apparently TuxGuitar uses SWT, Eclipse's GUI library, which contains native libraries (DLLs, on Windows). When you use native libraries from a Java program, the "bitness" of those libraries and the JVM must be the same - if you have 32-bit libraries, you must use a 32-bit JVM, and if you have 64-bit libraries, you must use a 64-bit JVM.

Isn't there a versopm pf TuxGuitar available with 64-bit SWT libraries?

If not, then it's no problem at all to install a 32-bit JVM besides the 64-bit JVM that you already have on your computer; just make sure to install it in a different directory then where your 64-bit JDK or JRE is installed. You do not need to uninstall the 64-bit version.
 
Jim Venolia
Ranch Hand
Posts: 574
VI Editor Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried installing the 32 bit version of jre, it insisted on removing my existing jre first. Oh well. Still get the same error though

I'm only seeing 1 download of TuxGuitar.

So I get the same error with both 32 and 64 bit version of jre.

What should I be doing to troubleshoot this?

I have the Java SDK and Eclipse installed on this machine as well.
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jim Venolia wrote:I tried installing the 32 bit version of jre, it insisted on removing my existing jre first.


Really? That's strange. Did you change the directory to install the 32-bit JRE in? I have the 32-bit and 64-bit version of Oracle's Java 7 JRE installed here (in different directories, ofcourse) and no such problems.
 
Jim Venolia
Ranch Hand
Posts: 574
VI Editor Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One put it into c:/Program Files (x86)/Java/jre, the other into c:/Program Files (x86)/Java. Each removed the prior installation first, even when I told it to install to a different directory.
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The 64 bit version should have been installed in C:\Program Files\Java, not C:\Program Files (x86)\Java. The latter is for 32-bit applications.
 
Jim Venolia
Ranch Hand
Posts: 574
VI Editor Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, looks like something with the installer. Didn't want to install the 32 bit version without removing the 64 bit version, and once I changed install directories everything went to a hot place.

I've currently got the 64 bit version jre in .../(x86)/Java. Not .../Java/jre

It's one of those things I don't feel like dorking with. Some things work, some won't, I'll miss Tuxguitar but I've put enough time into this BS for now. If I care I'll do an install, save the directory, install the other, and restore the first directory.

This all came up because of Rocksmith 2014. A few years ago I decided to learn guitar. I used Tuxguitar and sites like Justin's Guitar. Then Rocksmith came out. Plug your guitar into your PS3 and it teaches you guitar. It frustrated the hell out of me, and about 90% of the people who bought it. Basic problem was RS was a game, I wanted a teaching tool.

Heard about RS 2014 a few days ago. Read some reviews and ordered it. They've fixed all the major problems with RS, and most of the minor issues. Biggest change is, they decided it's a teaching tool and not a game. If you want to learn guitar buy Rocksmith 2014.

I'm slowfingers on the Rocksmith forums.

Back on topic, I used Tuxguitar to store scales and some practice riffs. I'll prolly use my old laptop to print out my Tuxguitar tab files and go from there.
 
Jim Venolia
Ranch Hand
Posts: 574
VI Editor Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got 32 and 64 bit jre's installed, plus the 64 bit jdk. Below is the .bat file that came with tuxguitar. How can I modify it to run the program? Or, given I have a bunch of .jar files, how can I repackage them to work for me?

I've tried the -d32 option, no joy.

cd "."
java -cp ;tuxguitar.jar;lib\swt.jar;lib\itext.jar;share\ -Djava.library.path=lib\ org.herac.tuxguitar.gui.TGMain %1 %2 %3 %4 %5 %6 %7 %8 %9 %10
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic