LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-03-2012, 04:58 PM   #1
szdavid24
LQ Newbie
 
Registered: Mar 2012
Posts: 19

Rep: Reputation: Disabled
Question Using Java 1.7 on Ubuntu 12.04b2


Hi!
I'm having trouble using the Java on the Ubuntu 12.04b2!
I've installed it successfully

(installation guide: http://www.wikihow.com/Install-Oracl...n-Ubuntu-Linux)

It means, that if I type in
Code:
java -version
or
Code:
javac -version
It gives me the same as in the guide but when I open Google Chrome and try to test java enabled I get an error says java is not installed..
Also, If I try to start a ".jar" file it just opens with the normal Archive Manager and gives no choice for running it as a Java program.
So what shall I do to make it enabled?

Thank you for your answers!
 
Old 04-04-2012, 02:05 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,538

Rep: Reputation: 134Reputation: 134
For chrome you probably need a java plugin. You may get it here:
http://chrome-plugins.org/java-plugin-chrome/

.jar files ar java archives. They can be loaded and executed by java containers but not from command line as far as I know. (I may be wrong) Maybe you can execute them with "java abc.jar" to invoke the vm first... But I'm just guessing at hte moment.

Cheers, good luck
j
 
Old 04-04-2012, 03:45 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,295

Rep: Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164
Files .jar :

Please use the command : java -jar file.jar
 
Old 04-04-2012, 06:33 AM   #4
szdavid24
LQ Newbie
 
Registered: Mar 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
j-ray:
The link you've gave me is for Windows and Mac users!
I know that there's a java plugin for chrome in Windows, but not in Linux..
knudfl:
Thanks for the syntax! Can I create a link or something which can start the jar file immediately? I mean I create a link with the command as an argument and when I click on the icon it starts the program

Thank you both!
 
Old 04-04-2012, 06:47 AM   #5
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,538

Rep: Reputation: 134Reputation: 134
you're right, sorry

maybe this helps
http://www.atpeaz.com/index.php/2010...ome-for-linux/
 
Old 04-04-2012, 07:22 AM   #6
szdavid24
LQ Newbie
 
Registered: Mar 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
You didnt checked out the link I've mentioned above!
The link you suggested is not working, I tried it several times.

The java is installed on my Ubuntu!
checked with "java -version" and "javac -version" and it gave me this:
Code:
david@David-Linux:~/Asztal$ java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)

and


javac 1.7.0_03
I just need to start this ****** .jar file..

Last edited by szdavid24; 04-04-2012 at 07:24 AM.
 
Old 04-04-2012, 08:01 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,295

Rep: Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164
The link in post #5 works OK ( now ).

Quote:
I just need to start this ****** .jar file..
Then read post # 3.
 
Old 04-04-2012, 08:11 AM   #8
szdavid24
LQ Newbie
 
Registered: Mar 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
Yes the command works fine, but I'm getting an error...
Code:
david@David-Linux:~/Asztal$ java -jar minecraft.jar

(java:24857): Gtk-WARNING **: Nem található a témamotor a következő modulútvonalon: „pixmap”,

(java:24857): Gtk-WARNING **: Nem található a témamotor a következő modulútvonalon: „pixmap”,

(java:24857): Gtk-WARNING **: Nem található a témamotor a következő modulútvonalon: „pixmap”,

(java:24857): Gtk-WARNING **: Nem található a témamotor a következő modulútvonalon: „pixmap”,
27 achievements
182 recipes
Setting user: szdavid24, 660299078561366
Exception in thread "Minecraft main thread" java.lang.UnsatisfiedLinkError: /home/david/hu-minecraft.net/bin/natives/liblwjgl.so: /home/david/hu-minecraft.net/bin/natives/liblwjgl.so: hibás ELF osztály: ELFCLASS32 (Possible cause: architecture word width mismatch)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(Unknown Source)
	at java.lang.ClassLoader.loadLibrary(Unknown Source)
	at java.lang.Runtime.load0(Unknown Source)
	at java.lang.System.load(Unknown Source)
	at org.lwjgl.Sys$1.run(Sys.java:69)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
	at org.lwjgl.Sys.loadLibrary(Sys.java:81)
	at org.lwjgl.Sys.<clinit>(Sys.java:98)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
	at net.minecraft.client.Minecraft.a(Minecraft.java:357)
	at net.minecraft.client.Minecraft.run(Minecraft.java:783)
	at java.lang.Thread.run(Unknown Source)
 
Old 04-04-2012, 08:36 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,295

Rep: Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164Reputation: 3164
# 8
Quote:
java.lang.UnsatisfiedLinkError:
/home/david/hu-minecraft.net/bin/natives/liblwjgl.so:
/home/david/hu-minecraft.net/bin/natives/liblwjgl.so:
hibás ELF osztály: ELFCLASS32 (Possible cause: architecture word width mismatch)
"Architecture .. mismatch".
Some hints : Please show the output from the command : 'file liblwjgl.so'

Probably a 32bits file ? And the java you installed is 64bits.
A 32bits java may be required ?

.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Java Woes: A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available ... chytraeus Slackware 10 11-27-2010 10:04 AM
Java RE and Ubuntu 10.4 Paul_Lee Linux - Software 9 07-12-2010 07:09 PM
Java | Ubuntu 8.04 | java.awt.HeadlessException akuma_linux Linux - Newbie 3 01-06-2009 10:27 AM
Ubuntu 7.10 64bit - how to set java path to/redirect java to libjvm.so ? Thane Ubuntu 1 03-25-2008 05:52 PM
Ubuntu Wi-fi and Java help help kol.klink Linux - Newbie 4 10-20-2006 09:33 AM


All times are GMT -5. The time now is 07:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration