LinuxQuestions.org
Register a domain and help support LQ
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 11-02-2009, 02:31 AM   #1
johnyjj2
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Rep: Reputation: 0
confused by java


Hello !

I installed this: JDK 6 Update 16 with NetBeans 6.7.1 from http://java.sun.com/javase/downloads/index.jsp

I include with this post (as txt) result of the following:

Code:
java -version

/usr/lib/jvm/java-1.5.0-sun/jre/bin/java -version
ls -la /usr/lib/jvm/java-1.5.0-sun/jre/bin

whereis java
Basically I've got problem with using java:

Code:
mainacc@mainacc-laptop:~/tutorial/sphinx4-1.0beta3-bin/sphinx4-1.0beta3/bin$ java -mx256m -jar bin/HelloWorld.jar
The program 'java' can be found in the following packages:
* gcj-4.4-jre-headless
* openjdk-6-jre-headless
* cacao
* gij-4.3
* jamvm
* kaffe
Try: sudo apt-get install <selected package>
java: command not found
mainacc@mainacc-laptop:~/tutorial/sphinx4-1.0beta3-bin/sphinx4-1.0beta3/bin$ sudo apt-get install gcj-4.4-jre-headless
[sudo] password for mainacc:
Czytanie list pakietĂłw... Gotowe
Budowanie drzewa zaleĹĽnoĹci
Odczyt informacji o stanie... Gotowe
E: Nie udaĹo się odnaleĹşć pakietu gcj-4.4-jre-headless
mainacc@mainacc-laptop:~/tutorial/sphinx4-1.0beta3-bin/sphinx4-1.0beta3/bin$
In other words I have file HelloWorld.jar and I try to open it with "java -mx256m -jar bin/HelloWorld.jar" (as explained in the tutorial) but it doesn't run it. So I did what it suggested me to do, i.e. "sudo apt-get install gcj-4.4-jre-headless" but it says "Packet gcj-4.4-jre-headless cannot be found".

Greetings!
Attached Files
File Type: txt java.txt (1.0 KB, 3 views)
 
Old 11-02-2009, 03:14 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
please post the output of those commands:
Code:
sudo updatedb
locate java
(updatedb may take some time)
 
Old 11-02-2009, 03:37 AM   #3
johnyjj2
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Original Poster
Rep: Reputation: 0
Thanks for your answer :-)!

Result is included in the file. However there were so many lines in the output that console couldn't handle all of them. I tried "cat > file.txt" but it didn't work - it saved to the file only commands which I entered, not those which were at the output.

In fact I downloaded one of newest versions of Ubuntu some days ago and the only two things which I did, were installing JDK 6 Update 16 with NetBeans 6.7.1 and some drivers for wifi (wifi still doesn't work :-( -> I explained it here http://ubuntuforums.org/showthread.p...02#post8220902).

Greetings :-)!
Attached Files
File Type: txt locate-java.txt (24.1 KB, 1 views)

Last edited by johnyjj2; 11-02-2009 at 03:40 AM.
 
Old 11-02-2009, 03:55 AM   #4
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
try this:
Code:
locate javac
 
Old 11-02-2009, 04:30 AM   #5
johnyjj2
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Original Poster
Rep: Reputation: 0
Thanks!!!
Can you also help me with wifi, please?
Attached Files
File Type: txt locate javac.txt (2.5 KB, 1 views)
 
Old 11-02-2009, 04:54 AM   #6
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
use that command and it should fix your problem (in this thread):
Code:
echo "export PATH=\$PATH:/usr/local/jdk1.6.0_16/bin" >> ~/.bashrc
. ~/.bashrc
Please open an other thread for your wifi problem.
 
  


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
learning java input output: tutorials for a confused student sought! titanium_geek Programming 9 12-11-2008 12:27 AM
Which Java Update Do I Download? - Confused! davidx Linux - Software 2 10-18-2008 10:07 PM
Confused nay Very Confused chrystlenight SUSE / openSUSE 3 08-28-2007 06:57 PM
LXer: Java news met with cautious optimism in free Java community LXer Syndicated Linux News 0 11-14-2006 11:21 PM
Java sun applet...so confused Ogledbyoldmen Linux - Software 4 10-12-2003 06:41 AM


All times are GMT -5. The time now is 06:32 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