Fedora Linux Support Community & Resources Center
  #1  
Old 13th March 2012, 09:13 PM
aryan110 Offline
Registered User
 
Join Date: Jan 2012
Location: India
Posts: 55
linuxfirefox
netbeans, java 7.1.1,

somebody please help me. am using fedora 16

i tired to install netbeans for one of my project work. so i downloaded jdk-6u31-linux-i586 when i tired to install i couldn't. there was some error.

then i tried to install jdk-7u3-nb-7_1_1-linux-ml.sh. once again am getting the error mentioned below

Configuring the installer...
Searching for JVM on the system...
Preparing bundled JVM ...
Extracting installation data...
Running the installer wizard...

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"

please help me. am running out of time. i have to finish installing netbeans and start with my project as early as possible and have to submit the final report.
Reply With Quote
  #2  
Old 13th March 2012, 10:14 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,118
linuxfirefox
Re: netbeans, java 7.1.1,

I'd suggest you not try the JDK 7 co-bundle with Netbeans (that's what the second attempt was doing), Try to do the first one which was the JDK 6 update 31 (JDK 7 is released for developer use but until it's on java.com it's not considered ready for general use). What was the error with the JDK 6? I also assume you have a 32bit machine and Fedora install?
Reply With Quote
  #3  
Old 14th March 2012, 05:39 PM
aryan110 Offline
Registered User
 
Join Date: Jan 2012
Location: India
Posts: 55
linuxfirefox
Re: netbeans, java 7.1.1,

thank you for your comment marko.

i had downloaded java 7 from the official site, i hope. here i have pasted the link below

http://www.oracle.com/technetwork/ja...ads/index.html

in that you will find JDK 7u3 + NetBeans.

when java 6u3 when i try to install using this command (mentioned below) it gives the error:

chmod +x /path/to/file/jdk-6u31-linux-*-rpm.bin
chmod: cannot access `/path/to/file/jdk-6u31-linux-*-rpm.bin': No such file or directory

referred site : http://www.if-not-true-then-false.co...-red-hat-rhel/

in the end i had downloaded Java Platform (JDK) 7u3 without netbeans and installed that. after that in add/remove i entered netbeans. result obtained :

Integrated Development Environment - netbeans-6.9-5.fc16

installation and other things went fine. but when i doubled click on netbeans icon i didn't open. i tired many times but never opened.

yes, am using fedora 16 and its 32 bit.

if you feel i have to uninstall everything and start from the scratch please guide. thank you
Reply With Quote
  #4  
Old 14th March 2012, 09:24 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,118
linuxfirefox
Re: netbeans, java 7.1.1,

Quote:
Originally Posted by aryan110 View Post
thank you for your comment marko.

i had downloaded java 7 from the official site, i hope. here i have pasted the link below

http://www.oracle.com/technetwork/ja...ads/index.html

in that you will find JDK 7u3 + NetBeans.

when java 6u3 when i try to install using this command (mentioned below) it gives the error:

chmod +x /path/to/file/jdk-6u31-linux-*-rpm.bin
chmod: cannot access `/path/to/file/jdk-6u31-linux-*-rpm.bin': No such file or directory


referred site : http://www.if-not-true-then-false.co...-red-hat-rhel/
Please be very specific here, you didn't actually type in this?:

chmod +x /path/to/file/jdk-6u31-linux-*-rpm.bin

That referred site's instructions meant that you need to substitute the particular path on your machine where your *.rpm.bin file got downloaded to in for "/path/to/file".
If you did substitute that, don't be insulted I have no idea what the level of computer knowledge is for different users here.
Probably the simplest thing is to us "su -" to become the root user like the referred instruction site said, then change directory to where your
jdk-6u31-linux-i586-rpm.bin is located, and then do:

Quote:
cd <put directory path here that you downloaded to>
chmod +x ./jdk-6u31-linux-i586-rpm.bin
./jdk-6u31-linux-i586-rpm.bin
and so on the same from there. That way you don't even have to care about the path part, it's just the filename

Last edited by marko; 15th March 2012 at 04:25 AM.
Reply With Quote
  #5  
Old 15th March 2012, 05:53 PM
aryan110 Offline
Registered User
 
Join Date: Jan 2012
Location: India
Posts: 55
linuxfirefox
Re: netbeans, java 7.1.1,

thank you for your patience and support marko

yes, i can understand. since am new to linux there are so many things which am yet to learn.
i did as you had asked me to do and installed java 6u31 linux i596 but am still not able to install netbeans. when i try to install net beans this is the error what it gives

Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"

and its exit(s).
the link mentioned below is what i used to install netbeans step by step.

http://www.if-not-true-then-false.co...-red-hat-rhel/

anything wrong please guide me. thank you once again.
Reply With Quote
  #6  
Old 15th March 2012, 06:57 PM
muep Offline
Registered User
 
Join Date: Jun 2006
Posts: 123
linuxfirefox
Re: netbeans, java 7.1.1,

Doesn't Netbeans work just fine with the JDK shipped in Fedora? Why go all that trouble to install a nearly identical JDK from outside the Fedora repositories?
Reply With Quote
  #7  
Old 15th March 2012, 08:29 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,118
linuxfirefox
Re: netbeans, java 7.1.1,

muep:
one reason I tend to use the real Oracle java is I'm not sure that the openjdk or whatever is in Fedora is being patched with the same quickness as the real oracle one. When I look at the names of the packages I see:

java-1.6.0-openjdk-devel

I don't really want to waste a bunch of time digging in the bug database at http://icedtea.classpath.org/bugzilla to figure out what Oracle update matches to the source package java-1.6.0-openjdk-1.6.0.0-65.1.11.1.fc16.src.rpm they used.

Now that Oracle is going to fully go to openjdk soon and they won't have their own separate flavor this whole problem is going to go away. openjdk is going to be the official Java

The other reason is that the netbeans people are running on the Oracle JDK, so it seems more likely to be problem free to use the same one they use. I really doubt that openjdk gets tested as much.


Reply With Quote
  #8  
Old 15th March 2012, 09:26 PM
aryan110 Offline
Registered User
 
Join Date: Jan 2012
Location: India
Posts: 55
linuxfirefox
Re: netbeans, java 7.1.1,

so might be the solution for the above problem?
Reply With Quote
  #9  
Old 15th March 2012, 09:33 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,118
linuxfirefox
Re: netbeans, java 7.1.1,

@aryan110

What did you mean, just using the openjdk with your netbeans?
Reply With Quote
  #10  
Old 16th March 2012, 03:13 PM
aryan110 Offline
Registered User
 
Join Date: Jan 2012
Location: India
Posts: 55
linuxfirefox
Re: netbeans, java 7.1.1,

Quote:
Originally Posted by marko View Post
@aryan110

What did you mean, just using the openjdk with your netbeans?

oh no no. am not into that discussion. i was talking about the netbeans problem.i have mentioned the problem above muep. i am done with installing jdk. its now netbeans that's giving the problem. i think you might have missed to see that post.

Last edited by aryan110; 16th March 2012 at 03:16 PM.
Reply With Quote
  #11  
Old 16th March 2012, 03:33 PM
timreid Offline
Registered User
 
Join Date: Apr 2005
Posts: 14
windows_7ie
Re: netbeans, java 7.1.1,

I looked over the guide you followed and failed to find any mention of changing alternatives to use the newly installed Java version. I would suggest running
Code:
java -version
at the command line to make sure you are using the Oracle JVM, and not still using the openJDK one.

If the version indicates you are still using the openJDK VM, please look at this guide -
http://www.mjmwired.net/resources/mj...-f16.html#java
for information on updating alternatives to use the correct java version by defualt.

Otherwise, I would look at your CLASSPATH to make sure that it is prpoerly set to look at the Oracle JVM, sincce the error message indicates that is cannot find a particualr class needed by the installer.

Just my $.02

-Tim
Reply With Quote
  #12  
Old 16th March 2012, 03:36 PM
aryan110 Offline
Registered User
 
Join Date: Jan 2012
Location: India
Posts: 55
linuxfirefox
Re: netbeans, java 7.1.1,

Quote:
Originally Posted by timreid View Post
I looked over the guide you followed and failed to find any mention of changing alternatives to use the newly installed Java version. I would suggest running
Code:
java -version
at the command line to make sure you are using the Oracle JVM, and not still using the openJDK one.

If the version indicates you are still using the openJDK VM, please look at this guide -
http://www.mjmwired.net/resources/mj...-f16.html#java
for information on updating alternatives to use the correct java version by defualt.

Otherwise, I would look at your CLASSPATH to make sure that it is prpoerly set to look at the Oracle JVM, sincce the error message indicates that is cannot find a particualr class needed by the installer.

Just my $.02

-Tim


java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode)
Reply With Quote
  #13  
Old 16th March 2012, 04:24 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,118
linuxfirefox
Re: netbeans, java 7.1.1,

Since you said (post #3) you installed JDK 6U31 after you installed JDK 7, that java -version result is wrong, you now want to use jdk 6 update 31.


Did you run the alternatives command to set up the JDK links?
see ref:
http://www.if-not-true-then-false.co...-red-hat-rhel/
in step 4a (only the first part titled "Use Java JDK latest version (/usr/java/latest)" ), then optionally step 4b (only the first image again) which sets up the browser for the java plugin


Of course replacing "jdk1.6.0_31" in all the places that reference has the wrong jdk name. Another option is to use "latest" everywhere and then make sure the link /usr/java/latest is pointed to the proper JDK ( /usr/java/jdk1.6.0_31)

Then do steps 5,6 and "post-installation setup" (substituting the particular selection number you want to select the jdk you want )

Of course in the "Post-installation setup" your JAVA_HOME should be set in your ~/.bash_profile as

export JAVA_HOME="/usr/java/latest"
or
export JAVA_HOME="/usr/java/jdk1.6.0_31"

NOTE that the terminal you are using only is updated to have JAVA_HOME set from the .bash_profile
after you either log out of the desktop and log back in or until you manually run "source .bash_profile"
in the shell you are using. Any other terminals are not updated until you run "source .bash_profile" in them
or start them as a new terminal. It's probably best to completely log out of Gnome or whatever
desktop and log back in after editing your .bash_profile to make sure all the windows have the
new configuration for the JAVA_HOME

When all is done, "java -version" and "alternatives --config java" should look like:
Quote:
java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 32-Bit Server VM (build 20.6-b01, mixed mode)
(there may be minor differences between what I show below and yours, what's important is that the JDK you want is
flagged with the "+" and "*"
Quote:
alternatives --config java

There are 4 programs which provide 'java'.

Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
3 /usr/java/1.7.0_03/bin/java
*+ 4 /usr/java/jdk1.6.0_31/bin/java
Enter to keep the current selection[+], or type selection number:
Only after the JDK is set-up should you try to install netbeans, only do the installation from a window with the updated JAVA_HOME variable set

Last edited by marko; 16th March 2012 at 04:38 PM.
Reply With Quote
  #14  
Old 18th March 2012, 09:43 PM
aryan110 Offline
Registered User
 
Join Date: Jan 2012
Location: India
Posts: 55
linuxfirefox
Re: netbeans, java 7.1.1,

Quote:
Originally Posted by marko View Post
Since you said (post #3) you installed JDK 6U31 after you installed JDK 7, that java -version result is wrong, you now want to use jdk 6 update 31.


Did you run the alternatives command to set up the JDK links?
see ref:
http://www.if-not-true-then-false.co...-red-hat-rhel/
in step 4a (only the first part titled "Use Java JDK latest version (/usr/java/latest)" ), then optionally step 4b (only the first image again) which sets up the browser for the java plugin


Of course replacing "jdk1.6.0_31" in all the places that reference has the wrong jdk name. Another option is to use "latest" everywhere and then make sure the link /usr/java/latest is pointed to the proper JDK ( /usr/java/jdk1.6.0_31)

Then do steps 5,6 and "post-installation setup" (substituting the particular selection number you want to select the jdk you want )

Of course in the "Post-installation setup" your JAVA_HOME should be set in your ~/.bash_profile as

export JAVA_HOME="/usr/java/latest"
or
export JAVA_HOME="/usr/java/jdk1.6.0_31"

NOTE that the terminal you are using only is updated to have JAVA_HOME set from the .bash_profile
after you either log out of the desktop and log back in or until you manually run "source .bash_profile"
in the shell you are using. Any other terminals are not updated until you run "source .bash_profile" in them
or start them as a new terminal. It's probably best to completely log out of Gnome or whatever
desktop and log back in after editing your .bash_profile to make sure all the windows have the
new configuration for the JAVA_HOME

When all is done, "java -version" and "alternatives --config java" should look like:
(there may be minor differences between what I show below and yours, what's important is that the JDK you want is
flagged with the "+" and "*"
Only after the JDK is set-up should you try to install netbeans, only do the installation from a window with the updated JAVA_HOME variable set

i did everything as you said. everything worked perfectly except when i used the command
./jdk-6u31-linux-i586-rpm.bin
i got a message with 1 file which said
"package jdk-2000:1.7.0_03-fcs.i586 (which is newer than jdk-2000:1.6.0_31-fcs.i586) is already installed
file /etc/init.d/jexec from install of jdk-2000:1.6.0_31-fcs.i586 conflicts with file from package jdk-2000:1.7.0_03-fcs.i586"

remaining all files got installed smoothly.

and in the end when i enter java -version it says
"bash: java: command not found..."

i used a command found on net before doing all the above operations
"yum remove *java*"
i just wantd to remove java7 and install java6. now am facing the music

Last edited by aryan110; 18th March 2012 at 09:47 PM.
Reply With Quote
  #15  
Old 18th March 2012, 09:59 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,118
linuxfirefox
Re: netbeans, java 7.1.1,

I think you already had jdk 1.6.0_31 installed.

If "java -version" reports that it's 1.6.0_31 then you don't need to install that ./jdk-6u31-linux-i586-rpm.bin
again.

Another quick way to check is to do "ls -l /usr/java"
(my machine below shows /usr/java as containing JDK 1.6.0_30 and _31 ):

Quote:
lrwxrwxrwx. 1 root root 16 Dec 9 21:39 default -> /usr/java/latest/
drwxr-xr-x. 9 root root 4096 Jan 24 22:53 jdk1.6.0_30/
drwxr-xr-x. 9 root root 4096 Feb 20 02:30 jdk1.6.0_31/
lrwxrwxrwx. 1 root root 21 Feb 20 02:30 latest -> /usr/java/jdk1.6.0_31/
and just see that the jdk code is there

JDK's are one of the packages that yum considers to be singular, that is it doesn't like your system to have more than one. That's why it's complaining about that JDK7 you put in before.

I usually prefer to not install the JDK with yum or rpm and just do it manually (from the oracle "tar" file) for that reason because I want to have multiple JDKs available (one latest and one as a fallback )
Reply With Quote
Reply

Tags
java, netbeans

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Sun Java (JDK), NetBeans IDE and LAMP on Fedora 15 madhawa Installation, Upgrades and Live Media 1 31st May 2011 07:52 PM
Java compile error in Netbeans 6.9 Indian Programming & Packaging 1 11th September 2010 05:47 PM
FC9 64 bit, java, NetBeans marknvicf Using Fedora 1 12th October 2008 04:36 PM
Java-NetBeans NoClassDefFound Error discuss Programming & Packaging 7 10th January 2007 02:38 PM
Eclipse/Netbeans and JAVA PATH LackeyLad Using Fedora 12 4th April 2005 08:58 AM


Current GMT-time: 02:18 (Friday, 19-12-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Creek Side - Stockholm-Arlanda Airport (ARN) Travel Photos on Instagram - Marina of Koper Travel Photos - Te Whiti Park Instagram Photos - Texas State Fair Photos on Instagram