You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Walter Oney <Wa...@oneylaw.com> on 2019/09/20 21:36:16 UTC
Problem using NetBeans on Ubuntu
I installed NetBeans IDE 10.0, in which Netbeans is at 8.3 Patch 2,
alongside the JDK v 11.0.4 on Ubuntu 5.0.0-27. Create a new Java
application, say HelloWorld. The generated app will neither build nor run.
The generated source program (HelloWorld.java) contains just this (not
counting comments):
package newhello;
public class HelloWorld {
public static void main(String[] args) {
}
}
The initial package statement is flagged because the IDE says it can't
access java.lang. The Projects pane lists "JDK 11 (Default)" under the
Libraries but nothing underneath that folder. The String declaration is
flagged as "can't find symbol". Alt+Enter offers no suggestions for how to
fix either problem.
--
Walter C. Oney, Jr., Esq.
267 Pearl Hill Rd., Fitchburg, MA 01420
Tel.: 978-343-3390
<http://www.oneylaw.com/> http://www.oneylaw.com
Re: Problem using NetBeans on Ubuntu
Posted by Geertjan Wielenga <ge...@apache.org>.
On Sat, 21 Sep 2019 at 06:04, Walter Oney <Wa...@oneylaw.com> wrote:
> From: Carl Mosca <ca...@gmail.com>
> > I am not sure about the file transfer part (Samba?) but given that it's
> small, you might copy the contents from the Output window for the build.
>
> I e-mailed the output log to myself. Here it is, sans reasonable
> formatting:
>
> -Dnb.internal.action.name=build jar
> init:
> Deleting:
> /home/walt/NetBeansProjects/JavaApplication1/build/built-jar.properties
> deps-jar:
> Updating property file:
> /home/walt/NetBeansProjects/JavaApplication1/build/built-jar.properties
> Compiling 1 source file to
> /home/walt/NetBeansProjects/JavaApplication1/build/classes
> compile:
> Copying 1 file to /home/walt/NetBeansProjects/JavaApplication1/build
> Building jar:
> /home/walt/NetBeansProjects/JavaApplication1/dist/JavaApplication1.jar
> To run this application from the command line without Ant, try:
> /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp
> /home/walt/NetBeansProjects/JavaApplication1/dist/JavaApplication1.jar
> javaapplication1.JavaApplication1
> deploy:
> jar:
> BUILD SUCCESSFUL (total time: 0 seconds)
>
> > I noticed you referenced "Applet" instead of "Application". Can you
> provide the steps you followed in NetBeans?
>
> Create new project, Java, Java application, then accept all defaults.
Nope, if you’re doing the above, you’re not using 11.1.
Gj
I wouldn't dignify a throwaway program like this as an "application" 😊
> The million-line bankruptcy petition program I wrote in C++ is an
> "application", as was the 3GL called Express for which I was the lead
> programmer back in the 80's. Maybe the thing I wrote for my Android phone
> to track Boston commuter rail, or the little MFC thingy I wrote to control
> my model railroad. But "javaapplication1"? No way.
>
> > If right click on the project and then select Properties and then Run,
> can you browse for the main class using the Browse button?
>
> <no main classes found>
>
>
> --
> Walter C. Oney, Jr., Esq.
> 267 Pearl Hill Rd., Fitchburg, MA 01420
> Tel.: 978-343-3390
> http://www.oneylaw.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
Re: Problem using NetBeans on Ubuntu
Posted by Carl Mosca <ca...@gmail.com>.
Thanks Neil. I was starting to wonder if all of the Applet stuff we have
lived through was a dream.
Did not say nightmare because it wasn't necessarily bad, just a part of
history. :)
On Sat, Sep 21, 2019 at 4:53 AM Neil C Smith <ne...@apache.org> wrote:
> On Sat, 21 Sep 2019 at 05:04, Walter Oney <Wa...@oneylaw.com> wrote:
> > Create new project, Java, Java application, then accept all defaults. I
> wouldn't dignify a throwaway program like this as an "application"
>
> Well, calling anything an Applet in a Java context is only going to
> confuse everyone!
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
--
Carl J. Mosca
Re: Problem using NetBeans on Ubuntu
Posted by Neil C Smith <ne...@apache.org>.
On Sat, 21 Sep 2019 at 05:04, Walter Oney <Wa...@oneylaw.com> wrote:
> Create new project, Java, Java application, then accept all defaults. I wouldn't dignify a throwaway program like this as an "application"
Well, calling anything an Applet in a Java context is only going to
confuse everyone!
Best wishes,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
RE: Problem using NetBeans on Ubuntu
Posted by Walter Oney <Wa...@oneylaw.com>.
From: Carl Mosca <ca...@gmail.com>
> I am not sure about the file transfer part (Samba?) but given that it's small, you might copy the contents from the Output window for the build.
I e-mailed the output log to myself. Here it is, sans reasonable formatting:
-Dnb.internal.action.name=build jar
init:
Deleting:
/home/walt/NetBeansProjects/JavaApplication1/build/built-jar.properties
deps-jar:
Updating property file:
/home/walt/NetBeansProjects/JavaApplication1/build/built-jar.properties
Compiling 1 source file to
/home/walt/NetBeansProjects/JavaApplication1/build/classes
compile:
Copying 1 file to /home/walt/NetBeansProjects/JavaApplication1/build
Building jar:
/home/walt/NetBeansProjects/JavaApplication1/dist/JavaApplication1.jar
To run this application from the command line without Ant, try:
/usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp
/home/walt/NetBeansProjects/JavaApplication1/dist/JavaApplication1.jar
javaapplication1.JavaApplication1
deploy:
jar:
BUILD SUCCESSFUL (total time: 0 seconds)
> I noticed you referenced "Applet" instead of "Application". Can you provide the steps you followed in NetBeans?
Create new project, Java, Java application, then accept all defaults. I wouldn't dignify a throwaway program like this as an "application" 😊
The million-line bankruptcy petition program I wrote in C++ is an "application", as was the 3GL called Express for which I was the lead programmer back in the 80's. Maybe the thing I wrote for my Android phone to track Boston commuter rail, or the little MFC thingy I wrote to control my model railroad. But "javaapplication1"? No way.
> If right click on the project and then select Properties and then Run, can you browse for the main class using the Browse button?
<no main classes found>
--
Walter C. Oney, Jr., Esq.
267 Pearl Hill Rd., Fitchburg, MA 01420
Tel.: 978-343-3390
http://www.oneylaw.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Problem using NetBeans on Ubuntu
Posted by Carl Mosca <ca...@gmail.com>.
I am not sure about the file transfer part (Samba?) but given that it's
small, you might copy the contents from the Output window for the build.
I noticed you referenced "Applet" instead of "Application". Can you
provide the steps you followed in NetBeans?
If right click on the project and then select Properties and then Run, can
you browse for the main class using the Browse button?
On Fri, Sep 20, 2019 at 9:33 PM Walter Oney <Wa...@oneylaw.com> wrote:
> From: Carl Mosca <ca...@gmail.com>
> > How was the project generated? I am assuming it is a NetBeans ant
> project based on the default names used.
>
> Yes.
>
> > Have you done a build? If so, is that successful? Can you provide the
> build output.
>
> The build was uneventful. It's hard for me to get a file from my
> dual-booted Win10/Ubuntu box onto my Windows network. Someday I'll figure
> out how to do that.
>
> The applet actually runs fine from the command line using the command ant
> suggested. So the issue about the class appears to be within Netbeans.
>
> --
> Walter C. Oney, Jr., Esq.
> 267 Pearl Hill Rd., Fitchburg, MA 01420
> Tel.: 978-343-3390
> http://www.oneylaw.com
>
>
>
>
--
Carl J. Mosca
RE: Problem using NetBeans on Ubuntu
Posted by Walter Oney <Wa...@oneylaw.com>.
From: Carl Mosca <ca...@gmail.com>
> How was the project generated? I am assuming it is a NetBeans ant project based on the default names used.
Yes.
> Have you done a build? If so, is that successful? Can you provide the build output.
The build was uneventful. It's hard for me to get a file from my dual-booted Win10/Ubuntu box onto my Windows network. Someday I'll figure out how to do that.
The applet actually runs fine from the command line using the command ant suggested. So the issue about the class appears to be within Netbeans.
--
Walter C. Oney, Jr., Esq.
267 Pearl Hill Rd., Fitchburg, MA 01420
Tel.: 978-343-3390
http://www.oneylaw.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Problem using NetBeans on Ubuntu
Posted by Carl Mosca <ca...@gmail.com>.
Hi Walter,
How was the project generated? I am assuming it is a NetBeans ant project
based on the default names used.
Have you done a build? If so, is that successful? Can you provide the
build output.
Carl
On Fri, Sep 20, 2019 at 8:42 PM Walter Oney <Wa...@oneylaw.com> wrote:
> I installed from netbeans.apache.org, and I'm now able to build Java and
> C++ programs (after installing the C++ plugin, that is). Thanks to the help
> I got on this list.
>
> Now for the next problem: the Java program I generate using Netbeans 11.1
> appears fine, but it won't run because it claims that there is no main
> class. In skeleton, the program reads:
>
> package javaapplication1;
> public class JavaApplication1 {
> public static void main(String[] args){}
> }
>
> When I try to run this, I get a pop-up to the effect that
> javaapplication1.JavaApplication1 wasn't found in the project. Compare the
> result using NetBeans 8.2 with the 1.8 JDK under Win10, where I didn't have
> to tinker with anything to make it work.
>
> --
> Walter C. Oney, Jr., Esq.
> 267 Pearl Hill Rd., Fitchburg, MA 01420
> Tel.: 978-343-3390
> http://www.oneylaw.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
--
Carl J. Mosca
RE: Problem using NetBeans on Ubuntu
Posted by Walter Oney <Wa...@oneylaw.com>.
I installed from netbeans.apache.org, and I'm now able to build Java and C++ programs (after installing the C++ plugin, that is). Thanks to the help I got on this list.
Now for the next problem: the Java program I generate using Netbeans 11.1 appears fine, but it won't run because it claims that there is no main class. In skeleton, the program reads:
package javaapplication1;
public class JavaApplication1 {
public static void main(String[] args){}
}
When I try to run this, I get a pop-up to the effect that javaapplication1.JavaApplication1 wasn't found in the project. Compare the result using NetBeans 8.2 with the 1.8 JDK under Win10, where I didn't have to tinker with anything to make it work.
--
Walter C. Oney, Jr., Esq.
267 Pearl Hill Rd., Fitchburg, MA 01420
Tel.: 978-343-3390
http://www.oneylaw.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Problem using NetBeans on Ubuntu
Posted by Laszlo Kishalmi <la...@gmail.com>.
If you've installed netbeans from package, please remove that. Ubuntu
has an old probably broken package for NetBeans 10 in its repositories.
Snap is an universal Linux packaging format backed by Canonical. We
release up-to date binaries there.
https://snapcraft.io/netbeans
Or if you type netbeans in the software center app in Ubuntu it will
bring you up two versions: "Apache NetBeans" and "NetBeans". Uninstall
the "NetBeans" and install the "Apache NetBeans" one.
Also You have the following possibilities when you install from Snap:
1. latest/stable: 11.1 at the moment. It will be updated to 11.2 as it
would come out.
2. latest/edge: 11.1 at the moment but will be updated with 11.2 beta
soon and will follow the release cycle.
3. 11.0/stable: 11.0 our current LTS release.
There is another option:
https://snapcraft.io/netbeans-dev
These are weekly updated builds from the master branch.
The netbeans and netbeans-dev Snap packages can be installed at the same
time, so you can have a stable and a regularly updated experimental
version of the IDE.
On 9/20/19 3:23 PM, Walter Oney wrote:
> From: Neil C Smith <ne...@apache.org>
>
>>> I installed NetBeans IDE 10.0, in which Netbeans is at 8.3 Patch 2,
>> What exactly does that mean? Try 11.1. NetBeans 10.0 is no longer supported. There is a Snap available for Ubuntu as well as the installers and zip.
> Somebody connected with Apache wrote the code that generated the About box in which 10.0 and 8.3 Patch 2 appear, so your guess is probably better than mine.
>
> Anyhow, what is a "Snap" and why did I get version 10.0 of the IDE just a few days ago when I tried to install the current stable release?
>
> --
> Walter C. Oney, Jr., Esq.
> 267 Pearl Hill Rd., Fitchburg, MA 01420
> Tel.: 978-343-3390
> http://www.oneylaw.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
RE: Problem using NetBeans on Ubuntu
Posted by Walter Oney <Wa...@oneylaw.com>.
Thank you!
-----Original Message-----
From: Jose Ch <pe...@gmail.com>
Sent: Friday, September 20, 2019 6:31 PM
To: Walter Oney <Wa...@oneylaw.com>
Cc: Neil C Smith <ne...@apache.org>; NetBeans Mailing List <us...@netbeans.apache.org>
Subject: Re: Problem using NetBeans on Ubuntu
This is the download page for Apache NetBeans:
https://netbeans.apache.org/download/index.html
Is it the same page that you used a few days ago?
El vie., 20 sept. 2019 a las 17:23, Walter Oney (<Walter.Oney@oneylaw.com <ma...@oneylaw.com> >) escribió:
From: Neil C Smith <neilcsmith@apache.org <ma...@apache.org> >
>> I installed NetBeans IDE 10.0, in which Netbeans is at 8.3 Patch 2,
> What exactly does that mean? Try 11.1. NetBeans 10.0 is no longer supported. There is a Snap available for Ubuntu as well as the installers and zip.
Somebody connected with Apache wrote the code that generated the About box in which 10.0 and 8.3 Patch 2 appear, so your guess is probably better than mine.
Anyhow, what is a "Snap" and why did I get version 10.0 of the IDE just a few days ago when I tried to install the current stable release?
--
Walter C. Oney, Jr., Esq.
267 Pearl Hill Rd., Fitchburg, MA 01420
Tel.: 978-343-3390
http://www.oneylaw.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org <ma...@netbeans.apache.org>
For additional commands, e-mail: users-help@netbeans.apache.org <ma...@netbeans.apache.org>
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Problem using NetBeans on Ubuntu
Posted by Jose Ch <pe...@gmail.com>.
This is the download page for Apache NetBeans:
https://netbeans.apache.org/download/index.html
Is it the same page that you used a few days ago?
El vie., 20 sept. 2019 a las 17:23, Walter Oney (<Wa...@oneylaw.com>)
escribió:
> From: Neil C Smith <ne...@apache.org>
>
> >> I installed NetBeans IDE 10.0, in which Netbeans is at 8.3 Patch
> 2,
>
> > What exactly does that mean? Try 11.1. NetBeans 10.0 is no longer
> supported. There is a Snap available for Ubuntu as well as the installers
> and zip.
>
> Somebody connected with Apache wrote the code that generated the About box
> in which 10.0 and 8.3 Patch 2 appear, so your guess is probably better than
> mine.
>
> Anyhow, what is a "Snap" and why did I get version 10.0 of the IDE just a
> few days ago when I tried to install the current stable release?
>
> --
> Walter C. Oney, Jr., Esq.
> 267 Pearl Hill Rd., Fitchburg, MA 01420
> Tel.: 978-343-3390
> http://www.oneylaw.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
RE: Problem using NetBeans on Ubuntu
Posted by Walter Oney <Wa...@oneylaw.com>.
From: Neil C Smith <ne...@apache.org>
>> I installed NetBeans IDE 10.0, in which Netbeans is at 8.3 Patch 2,
> What exactly does that mean? Try 11.1. NetBeans 10.0 is no longer supported. There is a Snap available for Ubuntu as well as the installers and zip.
Somebody connected with Apache wrote the code that generated the About box in which 10.0 and 8.3 Patch 2 appear, so your guess is probably better than mine.
Anyhow, what is a "Snap" and why did I get version 10.0 of the IDE just a few days ago when I tried to install the current stable release?
--
Walter C. Oney, Jr., Esq.
267 Pearl Hill Rd., Fitchburg, MA 01420
Tel.: 978-343-3390
http://www.oneylaw.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Problem using NetBeans on Ubuntu
Posted by Neil C Smith <ne...@apache.org>.
On Fri, 20 Sep 2019, 22:36 Walter Oney, <Wa...@oneylaw.com> wrote:
> I installed NetBeans IDE 10.0, in which Netbeans is at 8.3 Patch 2,
>
What exactly does that mean? Try 11.1. NetBeans 10.0 is no longer
supported. There is a Snap available for Ubuntu as well as the installers
and zip.
Best wishes,
Neil