Discussion:
Netbeans on linux
jasefacekhs
2014-10-11 18:31:47 UTC
Permalink
I installed netbeans through the software center. This is pretty much a fresh install. i have jdk 7, most recent download from netbeans, and a project from netbeans made in the same netbeans version but made from a windows box. i cannot open any of the files, nor can i create a new project, or open a project. it looks like everything is going well then it just doesn't do anything.

any ideas please? i prefer not to load up windows on this box i'm tired of it.
Vitaliy
2014-10-13 11:32:19 UTC
Permalink
What is "java -version" output?
jasefacekhs
2014-10-14 03:34:31 UTC
Permalink
command not found. i just assumed that it was installed properly, i'm doing some checking on how to get that error fixed.
Vitaliy
2014-10-14 05:15:43 UTC
Permalink
You have no java installed, or you accidentally removed it. Install java (http://www.java.com/en/download/help/download_options.xml)
Simon Roberts
2014-10-14 13:51:19 UTC
Permalink
command not found doesn't necessarily mean it's not installed, it might
just not be on your PATH variable.
Post by Vitaliy
You have no java installed, or you accidentally removed it. Install java (
http://www.java.com/en/download/help/download_options.xml)
--
Simon Roberts
Certified Professional Photographer
http://dancingcloudphotography.com
(303) 249 3613
jasefacekhs
2014-10-14 22:31:25 UTC
Permalink
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.2) (7u65-2.5.2-3~14.04)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

I got to this phase when typing java -version but netbeans still does not load projects.
Vitaliy
2014-10-15 10:39:15 UTC
Permalink
Try to install jdk from official oracle site.
jasefacekhs
2014-10-15 23:37:34 UTC
Permalink
This is the error that netbeans gives me, but i know these files are java 7 and as i said earlier made with netbeans.

Eclipse loads the java file just fine btw.

A java.lang.UnsupportedClassVersionError exception has occurred.
Please report this at http://www.netbeans.org/community/issues.html,
including a copy of your messages.log file as an attachment.
The messages.log file is located in your /home/jason/.netbeans/7.0/var/log folder.
Chuck Davis
2014-10-16 13:43:44 UTC
Permalink
Are you really using an ancient version of Netbeans? (i.e. 7.0)? Probably
most of us here have totally forgotten how to use something that old. You
will find the current version of Netbeans @ www.netbeans.org. Get it! It
is version 8.0.1. I don't remember but I think Netbeans 7.0 was for JDK1.6
?? And you're trying to work with 1.7 code......

Did you manage to get real java installed? There's a lot of difference
between real Java from Oracle or IBM and OpenJDK. Netbeans has been
reported to not work with IBM Java and is shaky at best with OpenJDK so
stick with Oracle Java.

Trust me, the effort to learn how to use Netbeans on Linux will be worth
every bit of effort you put into it but we're on our own since the distro
repositories are useless.
Post by jasefacekhs
This is the error that netbeans gives me, but i know these files are java
7 and as i said earlier made with netbeans.
Eclipse loads the java file just fine btw.
A java.lang.UnsupportedClassVersionError exception has occurred.
Please report this at http://www.netbeans.org/community/issues.html,
including a copy of your messages.log file as an attachment.
The messages.log file is located in your /home/jason/.netbeans/7.0/var/log folder.
Matthias Bläsing
2014-10-16 18:26:53 UTC
Permalink
Post by Chuck Davis
Did you manage to get real java installed? There's a lot of
difference between real Java from Oracle or IBM and OpenJDK. Netbeans
has been reported to not work with IBM Java and is shaky at best with
OpenJDK so stick with Oracle Java.
Ahem! _Real Java_ is the java that passes the TCK - this holds true for
Oracle JDK, OpenJDK and IBM JDK. (And according to oracle there issn't
such a big difference between OracleJDK and OpenJDK).

Just to not let this stand uncommented:

I run netbeans under linux exclusively on openJDK and have no problems.
This is in contrast to my experience under windows with the oracle JDK,
were I do experience lags.

So I oracle JDK bad? Most probably not, but so is OpenJDK not, so stop
spreading FUD.

Greetings

MAtthias
Chuck Davis
2014-10-16 19:02:34 UTC
Permalink
Matthias, glad to know it's working for you. But when it doesn't don't
hesitate to upgrade to something real. :)

Passing the TCK is the entry point -- not the destination. I don't believe
either vendor copies OpenJDK. It is my understanding they both implemented
the spec in their own way. I'm under the impression they both polish,
optimize and enhance their JVM -- perhaps I am wrong. But as long as
Oracle's JVM is free I'll continue to use it and recommend it for those
using Oracle products. It's the real deal! And don't forget OpenJDK
doesn't run on Oracle's SPARK nor does it run on IBM's iSeries, AIX or zOS
but all of them run Java -- natively. I believe you'll find OpenJDK is
limited to x86 architecture.

I haven't tested lately but a few years back IBM's JVM was noticeably
faster than Sun's. Now that all the big players are cooperating on the
reference implementation they may be more similar than different - but
different nevertheless.

Anyway, when a user is having a problem with Netbeans the first question is
whether they have Oracle Java installed -- always. Just like the first
solution for a Windows problem is automatically a reboot.

On Thu, Oct 16, 2014 at 11:26 AM, Matthias BlÀsing <
Post by Matthias Bläsing
Post by Chuck Davis
Did you manage to get real java installed? There's a lot of
difference between real Java from Oracle or IBM and OpenJDK. Netbeans
has been reported to not work with IBM Java and is shaky at best with
OpenJDK so stick with Oracle Java.
Ahem! _Real Java_ is the java that passes the TCK - this holds true for
Oracle JDK, OpenJDK and IBM JDK. (And according to oracle there issn't
such a big difference between OracleJDK and OpenJDK).
I run netbeans under linux exclusively on openJDK and have no problems.
This is in contrast to my experience under windows with the oracle JDK,
were I do experience lags.
So I oracle JDK bad? Most probably not, but so is OpenJDK not, so stop
spreading FUD.
Greetings
MAtthias
Benno Markiewicz
2014-10-16 21:05:48 UTC
Permalink
Post by Chuck Davis
Anyway, when a user is having a problem with Netbeans the first question
is whether they have Oracle Java installed -- always.
Yes, because NetBeans is tested with Oracle JDK in the NetCat acceptance
testing program.

With kind regards, markiewb

Chuck Davis
2014-10-15 13:34:33 UTC
Permalink
I develop exclusively on Linux (not Ubuntu) and Netbeans is superb in the
environment but.....

You have to install real Java. Find it at Oracle.com. Click on products
and select Java for developers. I recommend the current version of
JDK8u25.

After it is installed you have to modify your PATH variable so that the
system finds real java before it finds openjdk. Real Java will install and
make links to /usr/java/latest so add "PATH=/usr/java/latest/bin" to the
beginning of your PATH variable.

Run "java -version" at a command prompt to be sure you got the install
correct.

THEN install Netbeans 8.0.1.

All will be well with the world at that point.

If you're using Ubuntu (and calling it Linux) I also recommend an upgrade
to something better but that is a different discussion. But even the best
distros: DO NOT USE ANYTHING JAVA FROM A LINUX DISTRO REPOSITORY! It's a
recipe for disaster!!
Post by jasefacekhs
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.2) (7u65-2.5.2-3~14.04)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
I got to this phase when typing java -version but netbeans still does not load projects.
Matthias Bläsing
2014-10-15 17:12:21 UTC
Permalink
Post by Chuck Davis
You have to install real Java. Find it at Oracle.com. Click on
products and select Java for developers. I recommend the current
version of JDK8u25.
Seriously? Real Java? It might have been correct, that OpenJDK lagged
behind compared to the Oracle/Sun JDK, but remember OpenJDK is build by
SAP, Red Hat and Oracle. Oracle JDK compared to OpenJDK is mostly
identical.

The distribution packages are mostly up-to-date, if you can live with
java 7. I'm currently on a hand build OpenJDK 8 build and I have no
problems (and never had with OpenJDK (6-8)!).

Another important point: OpenJDK is the reference implementation
(https://jdk8.java.net/java-se-8-ri/)


Greetings

Matthias
Edson Richter
2014-10-15 17:39:41 UTC
Permalink
Unfortunately, during tests of NetBeans 8.0 I've found some nasty memory
management bugs related to OpenJDK 8.
Moving to Oracle JDK has ceased that issue.
Instead starting a flame war, I would recommend you to have both - and
in case of doubt, test in Oracle JDK.

Regards,

Atenciosamente,

Edson Carlos Ericksson Richter
Post by Matthias Bläsing
Post by Chuck Davis
You have to install real Java. Find it at Oracle.com. Click on
products and select Java for developers. I recommend the current
version of JDK8u25.
Seriously? Real Java? It might have been correct, that OpenJDK lagged
behind compared to the Oracle/Sun JDK, but remember OpenJDK is build by
SAP, Red Hat and Oracle. Oracle JDK compared to OpenJDK is mostly
identical.
The distribution packages are mostly up-to-date, if you can live with
java 7. I'm currently on a hand build OpenJDK 8 build and I have no
problems (and never had with OpenJDK (6-8)!).
Another important point: OpenJDK is the reference implementation
(https://jdk8.java.net/java-se-8-ri/)
Greetings
Matthias
Mitch Claborn
2014-10-13 23:26:32 UTC
Permalink
The version of NetBeans available in the Ubuntu software center is
almost always several releases old. For example, right now I'm showing
that they have 7.0.1 when 8.0.1 is current. You might have better luck
downloading directly from the NetBeans site and installing manually.

Mitch
Post by jasefacekhs
I installed netbeans through the software center. This is pretty much a fresh install. i have jdk 7, most recent download from netbeans, and a project from netbeans made in the same netbeans version but made from a windows box. i cannot open any of the files, nor can i create a new project, or open a project. it looks like everything is going well then it just doesn't do anything.
any ideas please? i prefer not to load up windows on this box i'm tired of it.
e***@hotmail.com
2014-10-13 23:35:52 UTC
Permalink
Simon Roberts
2014-10-14 00:18:35 UTC
Permalink
I, and I'm sure many others, am all Linux all the time; there should be no
need for you to go back to the evil empire. I'm currently running Ubuntu
14.04, Java 1.8, and in the past more-than-five years, have probably run
most of the intermediate releases of Ubuntu, Java, and NetBeans. I've never
had any problems with the regular Oracle JDK and NetBeans installations.

Are you sure this isn't simply a user privileges problem? who owns the
files that you can't open? Do you have access to them? If it's not that,
then I would definitely recommend you install the Oracle JDK, manually put
it on your path, manually configure JAVA_HOME variable, and start NetBeans
after that. If you start NetBeans from a command line, rather than by
clicking on an icon, the a) you'll know exactly what version you're
running, and b) you have a better chance of seeing error messages that
might tell you something useful.

Good luck, it's worth the effort in the clean air of Linux :)
Cheers,
Simon
Also, even if you download a recent release, OpenJDK has some bugs that
will prevent smooth execution.
Enviado do meu Telefone LG
------ Mensagem original ------
*De: *Mitch Claborn
*Data: *13/10/2014 20h27
*Assunto:*[nbusers] Re: Netbeans on linux
The version of NetBeans available in the Ubuntu software center is
almost always several releases old. For example, right now I'm showing
that they have 7.0.1 when 8.0.1 is current. You might have better luck
downloading directly from the NetBeans site and installing manually.
Mitch
Post by jasefacekhs
I installed netbeans through the software center. This is pretty much a fresh install. i have jdk 7, most recent download from netbeans, and a project from netbeans made in the same netbeans version but made from a windows box. i cannot open any of the files, nor can i create a new project, or open a project. it looks like everything is going well then it just doesn't do anything.
any ideas please? i prefer not to load up windows on this box i'm tired of it.
--
Simon Roberts
Certified Professional Photographer
http://dancingcloudphotography.com
(303) 249 3613
Continue reading on narkive:
Loading...