# [Solved] NetBeans - prosze o pomoc w instalacji

## nostromo2

Witam, jako ze musze opanowac w wiekszym stopniu kodowanie w javie postanowilem zainstalowac NetBeans. Problem w tym ze srodowisko nie bardzo tego chce  :Smile: 

Maly log:

```

verify-class-linkage:

netbeans:

  [genlist] Generating information for Auto Update...

  [nbmerge] /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans

  [nbmerge] builtmodules=[ide/applemenu, ide/branding, ide/launcher/upgrade, ide/updatecenters, ide/welcome]

  [nbmerge] builttargets=[-jdk-pre-preinit, -jdk-preinit, -jdk-warn, -jdk-presetdef-basic, -jdk-default, -jdk-init, -assure-jdk-1.4, assure-ant, bootstrap, init-module-list, set-buildnumber, init-tasks, init, all-ide/applemenu, all-ide/branding, all-ide/launcher/upgrade, all-ide/updatecenters, all-ide/welcome]

    [touch] Creating /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/nb.cluster.nb.built

build-one-cluster-check:

     [echo] Cluster nb.cluster.platform is :true:

build-one-cluster:

build-nozip:

    [mkdir] Created dir: /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/bin

     [copy] Copying 1 file to /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/bin

     [copy] Copying 1 file to /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/bin

     [copy] Copying 1 file to /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/bin

     [copy] Copying 1 file to /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/bin

    [mkdir] Created dir: /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/etc

     [copy] Copying 1 file to /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/etc

     [copy] Copying 1 file to /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/etc

     [echo] /var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src/nbbuild/netbeans/platform6/lib/nbexec

BUILD SUCCESSFUL

Total time: 6 minutes 29 seconds

>>> Source compiled.

>>> Test phase [not enabled]: dev-util/netbeans-5.5.1-r1

>>> Install netbeans-5.5.1-r1 into /var/tmp/portage/dev-util/netbeans-5.5.1-r1/image/ category dev-util

 * Installing the program...

 * Installing cpp...

Exception in thread "main" java.lang.NoClassDefFoundError: run

Caused by: java.lang.ClassNotFoundException: run

   at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

   at java.security.AccessController.doPrivileged(Native Method)

   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

   at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

   at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Could not find the main class: run.  Program will exit.

 * ERROR: dev-util/netbeans-5.5.1-r1 failed:

 *   Install cpp failed

 * 

 * Call stack:

 *     ebuild.sh, line   54:  Called src_install

 *   environment, line 4566:  Called install_extra 'cpp'

 *   environment, line 2235:  Called die

 * The specific snippet of code:

 *       java "-Duser.home=${T}" -cp "${WORKDIR}/${cluster}/setup.jar" run -silent -W "license.selection=1" -W "beanNbSelectionPanel.nbHome=${D}/${DESTINATION}" || die "Install ${cluster} failed"

 * 

 * If you need support, post the output of 'emerge --info =dev-util/netbeans-5.5.1-r1',

 * the complete build log and the output of 'emerge -pqv =dev-util/netbeans-5.5.1-r1'.

!!! When you file a bug report, please include the following information:

GENTOO_VM=sun-jdk-1.6  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.19"

JAVACFLAGS="-source 1.5 -target 1.5" COMPILER="javac"

and of course, the output of emerge --info

 * The complete build log is located at '/var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/environment'.

 * S: '/var/tmp/portage/dev-util/netbeans-5.5.1-r1/work/netbeans-src'

 * QA Notice: command not found:

 * 

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

 *    /var/tmp/portage/dev-util/netbeans-5.5.1-r1/temp/netbeans-c++-5_5_1-linux.bin: line 189: bc: command not found

>>> Failed to emerge dev-util/netbeans-5.5.1-r1, Log file:

```

Widze ze widnieje wpis GENTOO_VM=sun-jdk-1.6

u mnie jest tak :

```

javac -version : 

javac 1.6.0_17

java -version

java version "1.6.0_17"

OpenJDK Runtime Environment (IcedTea6 1.7.1) (Gentoo build 1.6.0_17-b17)

OpenJDK Client VM (build 16.0-b13, mixed mode)

```

Tle ze nie bardzo wiem co z tym robic  :Wink: 

Pozdrawiam

----------

## soban_

Polecam Ci eclipse, jednak czytajac Twojego posta zainstalowalem dev-util/netbeans w wersji 6.8-r1

 *Quote:*   

> soban@SoBaN-PC ~ $ eix netbean
> 
> [I] dev-util/netbeans
> 
>      Available versions:  
> ...

  Linki z ktorych mozesz skorzystac to:

http://www.gentoo.org/doc/pl/java.xml

Tutaj w ten sposób mam to ustawione:

 *Quote:*   

> soban@SoBaN-PC ~ $ java-config --list-available-vms
> 
> The following VMs are available for generation-2:
> 
> 1)      IcedTea6-bin 1.7.2 [icedtea6-bin]
> ...

 

http://en.gentoo-wiki.com/wiki/NetBeans - w tym linku znajduje się krok po kroku jak ustawic NetBeans'a.

Oczywiście podczas instalacji musiałem pobrać paczki, o które mardzuił - że jest wymagana akceptacja do nich licencji. (jms-1_1-fr-apidocs.zip sjp-1_0-fr-ri.zip i javaws-1_2-dev.zip) - należy je oczywiście umieścić w /usr/portage/distfiles/ (zgodnie z tym co emerge mówi).

Na Twoim miejscu bym spróbował ustawić jave, ewentualnie zmienić wersje dev-util/netbeans:

```
emerge -vq autounmask && autounmask =dev-util/netbeans-6.8-r1 && emerge -vquDN netbeans
```

Jednak chyba łatwiej jest wykonać po prostu:

```
emerge -vq eclipse-sdk
```

Polecam go, z tego powodu że chociażby konstruktor możesz dosłownie wyklikać (zwłaszcza przydatne są skróty klawiszowe).

----------

## nostromo2

Dziekuje, pomoglo.

----------

