You are not logged in.

#1 2017-03-31 02:49:47

LDykes
Member
Registered: 2017-03-31
Posts: 10

[SOLVED] Trouble Launching Netbeans

Trying to launch net beans from terminal returns:

which: no javac in (/home/marvin/Applications/.bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/openide/filesystems/FileUtil : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
        at org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:311)
        at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:259)
        at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.netbeans.core.startup.CLIOptions.cli(CLIOptions.java:159)
        at org.netbeans.core.startup.CLIOptions.cli(CLIOptions.java:98)
        at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234)
        at org.netbeans.CLIHandler.initialize(CLIHandler.java:519)
        at org.netbeans.CLIHandler.initialize(CLIHandler.java:384)
        at org.netbeans.MainImpl.execute(MainImpl.java:193)
        at org.netbeans.MainImpl.main(MainImpl.java:85)
        at org.netbeans.Main.main(Main.java:83)

Last edited by LDykes (2017-04-01 12:55:38)

Offline

#2 2017-03-31 03:15:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Trouble Launching Netbeans

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Co … s_and_code


What version of netbeans and Java do you have installed?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-03-31 03:59:46

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

netbeans 8.2-1 and Java 8

Offline

#4 2017-03-31 04:05:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Trouble Launching Netbeans

Java 8 is not an Arch package version. Please make some effort to help the people trying to assist you. Don't be a help vampire.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-03-31 04:45:41

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

I have java-openjfx 8.u121-1, jdk8-openjdk 8.u121-1.  I had java 7 related packages and under upon reading another thread (can't find which one it was) removed them and installed 8.  Now I seem to be getting the same error (listed above) along with

which: no javac in (/home/marvin/Applications/.bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)

Offline

#6 2017-03-31 05:06:54

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Trouble Launching Netbeans

How did you install those packages?

Did you read the wiki note:

Note: After installation, the Java environment will need to be recognized by the shell ($PATH variable). This can be done by sourcing /etc/profile from the command line or by logging out/in again of a Desktop Environment.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2017-03-31 10:47:04

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

Yes, I tried logging out and logging back in but I am not sure what is meant by:

the Java environment will need to be recognized by the shell ($PATH variable). This can be done by sourcing /etc/profile from the command line

If I,

 echo $PATH

in terminal then it returns

/home/marvin/Applications/.bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

...of course I don't know how useful that command is to what I am trying to accomplish but it was something I found here
https://www.cyberciti.biz/faq/linux-uni … -variable/
I didn't try to do anything instructed on the page for fear of digging a deeper hole.

Offline

#8 2017-03-31 12:12:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,892

Re: [SOLVED] Trouble Launching Netbeans

So why is /usr/lib/jvm/java-8-openjdk/bin not in your $PATH?

What's the content of /etc/profile.d/jre.sh ?
What is "stat /usr/bin/javac" ?
What's the output of "uname -a"?
And what is "pacman -Qkk java-environment-common java-runtime-common" ?

Offline

#9 2017-03-31 17:01:17

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

How did you install those packages?

I used

sudo pacman -Syu

So why is /usr/lib/jvm/java-8-openjdk/bin not in your $PATH?

I have no idea, I have tried sourcing but I am not sure if I am doing it right any way here are the results from that effor:

$ .~/etc/profile
bash: .~/etc/profile: No such file or directory

What's the content of /etc/profile.d/jre.sh ?

Not sure how to check the content

What is "stat /usr/bin/javac" ?

bash: stat/usr/bin/javac: No such file or directory

What's the output of "uname -a"?

Linux malpais 4.9.18-1-lts #1 SMP Sun Mar 26 14:21:00 CEST 2017 x86_64 GNU/Linux

And what is "pacman -Qkk java-environment-common java-runtime-common" ?

:: Synchronizing package databases...
 core is up to date
 extra                   1678.6 KiB   343K/s 00:05 [######################] 100%
 community                  3.8 MiB   533K/s 00:07 [######################] 100%
 multilib is up to date
warning: java-runtime-common-2-2 is up to date -- reinstalling
warning: java-environment-common-2-2 is up to date -- reinstalling
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (2) java-environment-common-2-2  java-runtime-common-2-2

Total Installed Size:  0.01 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]
(2/2) checking keys in keyring                     [######################] 100%
(2/2) checking package integrity                   [######################] 100%
(2/2) loading package files                        [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
(2/2) checking available disk space                [######################] 100%
:: Processing package changes...
(1/2) reinstalling java-runtime-common             [######################] 100%
(2/2) reinstalling java-environment-common         [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[marvin@malpais ~]$ .~/etc/profile
bash: .~/etc/profile: No such file or directory
[marvin@malpais ~]$ stat/usr/bin/javac
bash: stat/usr/bin/javac: No such file or directory
[marvin@malpais ~]$ uname -a
Linux malpais 4.9.18-1-lts #1 SMP Sun Mar 26 14:21:00 CEST 2017 x86_64 GNU/Linux
[marvin@malpais ~]$ pacman -Qkk java-environment-common java-runtime-common
java-environment-common: 30 total files, 0 altered files
warning: java-runtime-common: /usr/lib/jvm/default (Symlink path mismatch)
warning: java-runtime-common: /usr/lib/jvm/default (Modification time mismatch)
warning: java-runtime-common: /usr/lib/jvm/default-runtime (Symlink path mismatch)
warning: java-runtime-common: /usr/lib/jvm/default-runtime (Modification time mismatch)
java-runtime-common: 22 total files, 2 altered files

Offline

#10 2017-03-31 18:17:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,892

Re: [SOLVED] Trouble Launching Netbeans

$ .~/etc/profile
bash: .~/etc/profile: No such file or directory

There's supposed to be a blank between the dot and the rest. Also it's not "~/etc" but "/etc" and /etc/profile should be sourced by about any shell (text or graphical) anyway.

Not sure how to check the content

man cat

bash: stat/usr/bin/javac: No such file or directory

stat /usr/bin/javac

There's a blank between stat and the rest as well ...

Did reinstalling those packages make any difference reg.

which: no javac in (/home/marvin/Applications/.bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)

?

What's  the ouput of "which javac"?

Offline

#11 2017-03-31 18:49:57

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

What's the content of /etc/profile.d/jre.sh ?

$ cat /etc/profile.d/jre.sh
# Do not change this unless you want to completely by-pass Arch Linux' way
# of handling Java versions and vendors. Instead, please use script `archlinux-j
ava`
export PATH=${PATH}:/usr/lib/jvm/default/bin
 stat /usr/bin/javac
  File: /usr/bin/javac -> /usr/lib/jvm/default/bin/javac
  Size: 30              Blocks: 0          IO Block: 4096   symbolic link
Device: 801h/2049d      Inode: 679672      Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2017-03-30 11:57:59.556694977 -0500
Modify: 2014-11-02 07:26:06.000000000 -0600
Change: 2017-03-30 11:48:03.596679836 -0500
 Birth: -

Did reinstalling those packages make any difference reg.

Yeah, somewhat:

which: no javac in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default
/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)

What's  the ouput of "which javac"?

 which javac
which: no javac in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/

Offline

#12 2017-03-31 19:32:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,892

Re: [SOLVED] Trouble Launching Netbeans

As you might have noticed before, there's a local deviation in the target of /usr/lib/jvm/default, so what's

stat /usr/lib/jvm/default/bin/javac

and, assuming this will fail for non existence, check

stat /usr/lib/jvm/default

, determine whether the re-link happened deliberately and in doubt just delete the two broken symlinks and re-install java-runtime-common.

Offline

#13 2017-04-01 11:35:38

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

The first was is in fact non existent however the second command returns:

$ stat /usr/lib/jvm/default
  File: /usr/lib/jvm/default -> java-7-openjdk/jre
  Size: 18              Blocks: 0          IO Block: 4096   symbolic link
Device: 801h/2049d      Inode: 794768      Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2017-03-30 11:57:59.556694977 -0500
Modify: 2017-03-30 11:48:03.596679836 -0500
Change: 2017-03-30 11:48:03.596679836 -0500
 Birth: -

I thought I had deleted anything Java 7.  How would I determine whether or not the was a deliberate re-link and when you say delete the two broken symlinks  I'm assuming your talking about

/usr/lib/jvm/default/bin/javac

and

usr/lib/jvm/default

Offline

#14 2017-04-01 11:40:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,892

Re: [SOLVED] Trouble Launching Netbeans

stat /usr/lib/jvm/default /usr/lib/jvm/default-runtime

If those are symlinks to jdk7 (which you wanted to get rid of), remove the two files and re-install the package.

Offline

#15 2017-04-01 12:28:20

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

$ rm  /usr/lib/jvm/default /usr/lib/jvm/default-runtime
rm: cannot remove '/usr/lib/jvm/default': Permission denied
rm: cannot remove '/usr/lib/jvm/default-runtime': Permission denied

should I force this or am I doing it wrong entirely

Offline

#16 2017-04-01 12:35:59

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

Asked that too soon

Offline

#17 2017-04-01 12:48:53

LDykes
Member
Registered: 2017-03-31
Posts: 10

Re: [SOLVED] Trouble Launching Netbeans

Thanks dude...that seems to have done it.

Offline

Board footer

Powered by FluxBB