You are not logged in.

#1 2016-10-10 16:00:47

step
Member
Registered: 2016-05-09
Posts: 56

[SOLVED]Netbeans don't start

Hi all, i have installed netbeans but it don't start; if i try to start it by terminal i have the same "error"

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)

i hope someone can help me! Thank you in advance.

Last edited by step (2016-10-12 08:59:06)

Offline

#2 2016-10-10 16:57:28

jeremyjh
Member
Registered: 2016-10-09
Posts: 10

Re: [SOLVED]Netbeans don't start

That error indicates the Java classes were compiled with a compiler at a different major version from your runtime. Netbeans 8.2 requires Java 8. You probably have a java7 package installed, I would remove jdk7-openjdk and install jdk8-openjdk. I think this is a bug on the netbeans pkgbuild as it's dependencies allow for jdk 7.

Offline

#3 2016-10-11 14:30:16

step
Member
Registered: 2016-05-09
Posts: 56

Re: [SOLVED]Netbeans don't start

Thank you very much for help, now it work correctly but it's born another "problem": the font of the program isn't good (i can't see e it correctly). I don't know if I expleined in any case I place a screen to explain better.

http://imgur.com/a/zR90H

I hope you can help me another time.

Offline

#4 2016-10-11 15:27:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: [SOLVED]Netbeans don't start

Try

export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2016-10-11 15:46:28

step
Member
Registered: 2016-05-09
Posts: 56

Re: [SOLVED]Netbeans don't start

ewaller wrote:

Try

export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'

I try your command but nothing is changed! I tried to search but i don't found nothing that can help me sad

Offline

#6 2016-10-11 15:53:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: [SOLVED]Netbeans don't start

step wrote:

I try your command but nothing is changed!...

Could be.  How did you start Netbeans?  I made the assumption you would launch it from the command line after having entered that command in the same shell.

To be certain, try

_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' netbeans

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2016-10-11 16:02:55

step
Member
Registered: 2016-05-09
Posts: 56

Re: [SOLVED]Netbeans don't start

ewaller wrote:
step wrote:

I try your command but nothing is changed!...

Could be.  How did you start Netbeans?  I made the assumption you would launch it from the command line after having entered that command in the same shell.

To be certain, try

_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' netbeans

Thank you so much you're a genius, I'm a noob; sorry sad how can I set this command so that it runs every time you start NetBeans (or something)?

Offline

#8 2016-10-11 16:06:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: [SOLVED]Netbeans don't start

Put the export command into ~/.bashrc  so bash sources it (or ./zshrc if you are a zsh user)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2016-10-11 17:03:16

step
Member
Registered: 2016-05-09
Posts: 56

Re: [SOLVED]Netbeans don't start

ewaller wrote:

Put the export command into ~/.bashrc  so bash sources it (or ./zshrc if you are a zsh user)

I tried to put it in ~/.bashrc but don't work, how i can do?

Offline

#10 2016-10-11 17:05:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: [SOLVED]Netbeans don't start

Did you log out and back in?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#11 2016-10-11 19:10:49

step
Member
Registered: 2016-05-09
Posts: 56

Re: [SOLVED]Netbeans don't start

ewaller wrote:

Did you log out and back in?

Yes, i have reboot and re-started netbeans but it don't change font.

EDIT:

This is my file bashrc:

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'

Last edited by step (2016-10-11 19:15:08)

Offline

#12 2016-10-11 20:30:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: [SOLVED]Netbeans don't start

You need an export (and a space) in front of the _JAVA_OPTIONS


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#13 2016-10-11 23:16:59

jeremyjh
Member
Registered: 2016-10-09
Posts: 10

Re: [SOLVED]Netbeans don't start

Wouldn't it better to put it in .bash_profile? Then he can launch netbeans from his desktop environment (assuming bash is the default shell for his account).

Offline

#14 2016-10-11 23:30:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: [SOLVED]Netbeans don't start

Probably.  I always get that one wrong hmm

Edit: Largely because I start X from a shell, never from a display manager.

Last edited by ewaller (2016-10-11 23:31:43)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#15 2016-10-12 08:58:38

step
Member
Registered: 2016-05-09
Posts: 56

Re: [SOLVED]Netbeans don't start

jeremyjh wrote:

Wouldn't it better to put it in .bash_profile? Then he can launch netbeans from his desktop environment (assuming bash is the default shell for his account).

ewaller wrote:

You need an export (and a space) in front of the _JAVA_OPTIONS

Thanks a lot to both, I put

export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

in ~/.bash_profile and now it work correctly!

Offline

#16 2016-10-13 14:21:43

whatshisname
Member
Registered: 2010-04-24
Posts: 163

Re: [SOLVED]Netbeans don't start

jeremyjh wrote:

That error indicates the Java classes were compiled with a compiler at a different major version from your runtime. Netbeans 8.2 requires Java 8. You probably have a java7 package installed, I would remove jdk7-openjdk and install jdk8-openjdk. I think this is a bug on the netbeans pkgbuild as it's dependencies allow for jdk 7.

I know this thread is marked [SOLVED] but I had this same problem and solved it another way.

I was unable to remove jdk7-openjdk from my system.  I could never get past dependency hell, in particular "java-environment-common".  It kept presenting itself as a dependency upon itself somehow.

What I did was install jdk8-openjdk, then:

archlinux-java unset java-7-openjdk
archlinux-java set java-8-openjdk

And netbeans is firing up again.

Hope this helps.

Offline

#17 2018-09-10 03:19:36

krushndayshmookh
Member
From: India
Registered: 2018-09-10
Posts: 1
Website

Re: [SOLVED]Netbeans don't start

whatshisname wrote:

What I did was install jdk8-openjdk, then:

archlinux-java unset java-7-openjdk
archlinux-java set java-8-openjdk

And netbeans is firing up again.

Hope this helps.

It worked. I am using jdk-10-openjdk. Seems netbeans only checks the default jdk to start.

Last edited by krushndayshmookh (2018-09-10 03:20:32)

Offline

#18 2018-09-10 06:32:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED]Netbeans don't start

Please don't necrobump solved threads, this step is already well documented on the wiki.

Closing.

Offline

Board footer

Powered by FluxBB