NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Version 7.0.1 does not seem to support version 7 very well.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
fairce



Joined: 20 Sep 2011
Posts: 20
Location: Ypsilanti, MI

PostPosted: Wed Sep 28, 2011 6:10 pm    Post subject: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

I have been working with Netbeans 7.0.1 for about 8 weeks and I have run into one big nuisance. It was down loaded with Java 7 (or 1.7, as it were). Java is new too me, being an old C and C++ hack. (By the way, I love the language. It fixes virtually all the problems that came from trying to layer C++ on C without throwing out all the inappropriate junk!) But Netbean 7.0.1 won't let me set the Source Level above 1.6 if I go to the Sources tab on the Properties dialog box of a Project.

This started, because the hint markers showed up in the line number column about various Java 7 features (e.g. multicatch), but when I tried to use them I would get errors.

Nosing around, I found that I could change the project.properties file of the Project to javac.source=1.7 and the Java 7 features then work. But then the Properties page shows 1.4. If I add a library on the Properties page, it clears the javac.source entry and I start getting compile errors. I have fixed this a good two dozen times since I started. It is a real pain.

Also, then, when I set the 1.7 level, I get a whole list of warnings from the annotation processor like this:

warning: Supported source version 'RELEASE_6' from annotation processor 'org.netbeans.modules.openide.util.NbBundleProcessor' less than -source '1.7'

Personally, I like to get rid of warnings if I can. Too many make the occasional new, important one get inadvertently ignored.

So it seems that if Netbeans 7.0.1 is going to be distributed with Java 7, it ought to support it without all the hassle. Is there something simple that I am missing? It makes the whole release seem a bit schizophrenic!

Edward Fairchild
fairce@comcast.net
Back to top
libor



Joined: 03 Jun 2011
Posts: 60

PostPosted: Fri Sep 30, 2011 8:58 am    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

Hello Edward,
I am just facing the similar issues with NB IDE 7.0.1 + JDK 7. It's already
little time ago when you sent this post but did you solve it somehow?

Libor Jelinek
http://devblog.virtage.com/libor-jelinek

--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/Version-7-0-1-does-not-seem-to-support-version-7-very-well-tp4850042p4856203.html
Sent from the Netbeans RCP/Platform Users (Open API) mailing list archive at Nabble.com.
Back to top
fairce



Joined: 20 Sep 2011
Posts: 20
Location: Ypsilanti, MI

PostPosted: Sun Oct 02, 2011 2:24 am    Post subject: Setting Netbeans 7.0.1 for Java 7. Reply with quote

After you set the version under Sources in the Properties of any module, you will get a line in the project.properties file, which is under the Important Files of the module. For mine there is always a javac.compilerargs= entry. The version of Java that you selected will be on a line named javac.source= with the version number that you chose, unless it is the default value. So either change the one there to be the following or add

    javac.source=1.7


Then it will admit any of the Java 7 language features.

The problem is though, if you change other Properties of the Module, it keeps removing that line, or resetting it to a different value. So you have to keep going in and changing it. You will know that it happens, because you will start getting compiler errors for the features you use. Also you will have warnings from the annotation processor that it only will support up through version 6. It seems to work, it is just a nuisance. When you go back into Properties under Sources for the module, it will show a source level of 1.4, which you have to just ignore.

It seems like there should be some entry somewhere to add 1.7 to the list in that drop-down box under Sources under Properties for the Module, but I don't know where it lives.
Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 2:45 am    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

On 10/02/2011 04:24 AM, fairce wrote:
Quote:
After you set the version under Sources in the Properties of any module, you will get a line in the project.properties file, which is under the Important Files of the module. For mine there is always a javac.compilerargs= entry. The version of Java that you selected will be on a line named javac.source= with the version number that you chose, unless it is the default value. So either change the one there to be the following or add

javac.source=1.7

Then it will admit any of the Java 7 language features.

The problem is though, if you change other Properties of the Module, it keeps removing that line, or resetting it to a different value. So you have to keep going in and changing it. You will know that it happens, because you will start getting compiler errors for the features you use. Also you will have warnings from the annotation processor that it only will support up through version 6. It seems to work, it is just a nuisance. When you go back into Properties under Sources for the module, it will show a source level of 1.4, which you have to just ignore.

It seems like there should be some entry somewhere to add 1.7 to the list in that drop-down box under Sources under Properties for the Module, but I don't know where it lives.




If you start the IDE on Java 7, it will be included in the drop-down.

Look in etc/netbeans.conf and see what JDK is being referred to.

Gj
Back to top
Carlos Hoces
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 9:05 am    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

No, it doesn't seem to work.
This is the line I currently have in conf:
netbeans_jdkhome="E:\Archivos de programa\Java\jdk1.7.0_02"

and I have the same problem since NetBeans 7.0 beta, up to current 7.0.1, regardless the Java 1.7 version used. I've tried it with 1.7 versions since last January.

El 02/10/2011 3:52, Geertjan Wielenga :
Quote:
On 10/02/2011 04:24 AM, fairce wrote:
Quote:
After you set the version under Sources in the Properties of any module, you will get a line in the project.properties file, which is under the Important Files of the module. For mine there is always a javac.compilerargs= entry. The version of Java that you selected will be on a line named javac.source= with the version number that you chose, unless it is the default value. So either change the one there to be the following or add

javac.source=1.7

Then it will admit any of the Java 7 language features.

The problem is though, if you change other Properties of the Module, it keeps removing that line, or resetting it to a different value. So you have to keep going in and changing it. You will know that it happens, because you will start getting compiler errors for the features you use. Also you will have warnings from the annotation processor that it only will support up through version 6. It seems to work, it is just a nuisance. When you go back into Properties under Sources for the module, it will show a source level of 1.4, which you have to just ignore.

It seems like there should be some entry somewhere to add 1.7 to the list in that drop-down box under Sources under Properties for the Module, but I don't know where it lives.




If you start the IDE on Java 7, it will be included in the drop-down.

Look in etc/netbeans.conf and see what JDK is being referred to.

Gj
--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay
Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 11:19 am    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

On 10/02/2011 10:12 AM, Carlos Hoces wrote:
Quote:
No, it doesn't seem to work.
This is the line I currently have in conf:
netbeans_jdkhome="E:\Archivos de programa\Java\jdk1.7.0_02"

and I have the same problem since NetBeans 7.0 beta, up to current 7.0.1, regardless the Java 1.7 version used. I've tried it with 1.7 versions since last January.


What do you see when you go to Tools | Java Platforms?

Gj

Quote:
El 02/10/2011 3:52, Geertjan Wielenga :
Quote:
On 10/02/2011 04:24 AM, fairce wrote:
Quote:
After you set the version under Sources in the Properties of any module, you will get a line in the project.properties file, which is under the Important Files of the module. For mine there is always a javac.compilerargs= entry. The version of Java that you selected will be on a line named javac.source= with the version number that you chose, unless it is the default value. So either change the one there to be the following or add

javac.source=1.7

Then it will admit any of the Java 7 language features.

The problem is though, if you change other Properties of the Module, it keeps removing that line, or resetting it to a different value. So you have to keep going in and changing it. You will know that it happens, because you will start getting compiler errors for the features you use. Also you will have warnings from the annotation processor that it only will support up through version 6. It seems to work, it is just a nuisance. When you go back into Properties under Sources for the module, it will show a source level of 1.4, which you have to just ignore.

It seems like there should be some entry somewhere to add 1.7 to the list in that drop-down box under Sources under Properties for the Module, but I don't know where it lives.




If you start the IDE on Java 7, it will be included in the drop-down.

Look in etc/netbeans.conf and see what JDK is being referred to.

Gj
--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay
Back to top
Carlos Hoces
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 11:42 am    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

I see the JDK installed:

JDK 1.7 default
and the folder as in netbeans_jdkhome below.

I do not have any other Java Platform installed. Code gets checked and compiled against Java 1.7 w/o any problem.


El 02/10/2011 12:26, Geertjan Wielenga :
Quote:
On 10/02/2011 10:12 AM, Carlos Hoces wrote:
Quote:
No, it doesn't seem to work.
This is the line I currently have in conf:
netbeans_jdkhome="E:\Archivos de programa\Java\jdk1.7.0_02"

and I have the same problem since NetBeans 7.0 beta, up to current 7.0.1, regardless the Java 1.7 version used. I've tried it with 1.7 versions since last January.


What do you see when you go to Tools | Java Platforms?

Gj

Quote:
El 02/10/2011 3:52, Geertjan Wielenga :
Quote:
On 10/02/2011 04:24 AM, fairce wrote:
Quote:
After you set the version under Sources in the Properties of any module, you will get a line in the project.properties file, which is under the Important Files of the module. For mine there is always a javac.compilerargs= entry. The version of Java that you selected will be on a line named javac.source= with the version number that you chose, unless it is the default value. So either change the one there to be the following or add

javac.source=1.7

Then it will admit any of the Java 7 language features.

The problem is though, if you change other Properties of the Module, it keeps removing that line, or resetting it to a different value. So you have to keep going in and changing it. You will know that it happens, because you will start getting compiler errors for the features you use. Also you will have warnings from the annotation processor that it only will support up through version 6. It seems to work, it is just a nuisance. When you go back into Properties under Sources for the module, it will show a source level of 1.4, which you have to just ignore.

It seems like there should be some entry somewhere to add 1.7 to the list in that drop-down box under Sources under Properties for the Module, but I don't know where it lives.




If you start the IDE on Java 7, it will be included in the drop-down.

Look in etc/netbeans.conf and see what JDK is being referred to.

Gj
--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay

--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay
Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 12:28 pm    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

On 10/02/2011 12:50 PM, Carlos Hoces wrote:
Quote:
I see the JDK installed:

JDK 1.7 default
and the folder as in netbeans_jdkhome below.

I do not have any other Java Platform installed. Code gets checked and compiled against Java 1.7 w/o any problem.

OK, so what does this sentence mean: "The problem is though, if you change other Properties of the Module, it keeps removing that line, or resetting it to a different value."

In other words, can you describe step by step what should be done to reproduce your problem? I.e., like this:

1. Start up NetBeans IDE.

2.

3.

4.

5. Now I see this problem: <description of problem>

Then we can take your steps and see what you're experiencing.

Gj

Quote:


El 02/10/2011 12:26, Geertjan Wielenga :
Quote:
On 10/02/2011 10:12 AM, Carlos Hoces wrote:
Quote:
No, it doesn't seem to work.
This is the line I currently have in conf:
netbeans_jdkhome="E:\Archivos de programa\Java\jdk1.7.0_02"

and I have the same problem since NetBeans 7.0 beta, up to current 7.0.1, regardless the Java 1.7 version used. I've tried it with 1.7 versions since last January.


What do you see when you go to Tools | Java Platforms?

Gj

Quote:
El 02/10/2011 3:52, Geertjan Wielenga :
Quote:
On 10/02/2011 04:24 AM, fairce wrote:
Quote:
After you set the version under Sources in the Properties of any module, you will get a line in the project.properties file, which is under the Important Files of the module. For mine there is always a javac.compilerargs= entry. The version of Java that you selected will be on a line named javac.source= with the version number that you chose, unless it is the default value. So either change the one there to be the following or add

javac.source=1.7

Then it will admit any of the Java 7 language features.

The problem is though, if you change other Properties of the Module, it keeps removing that line, or resetting it to a different value. So you have to keep going in and changing it. You will know that it happens, because you will start getting compiler errors for the features you use. Also you will have warnings from the annotation processor that it only will support up through version 6. It seems to work, it is just a nuisance. When you go back into Properties under Sources for the module, it will show a source level of 1.4, which you have to just ignore.

It seems like there should be some entry somewhere to add 1.7 to the list in that drop-down box under Sources under Properties for the Module, but I don't know where it lives.




If you start the IDE on Java 7, it will be included in the drop-down.

Look in etc/netbeans.conf and see what JDK is being referred to.

Gj
--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay

--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay
Back to top
Carlos Hoces
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 12:59 pm    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

Steps taken:

1
Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 1:14 pm    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

On 10/02/2011 02:07 PM, Carlos Hoces wrote:
Quote:
Steps taken:

1
Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 1:17 pm    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

On 10/02/2011 02:21 PM, Geertjan Wielenga wrote:
Quote:
E:\Archivos de programa\Java\jdk1.7.0_02
Maybe two things you can try, but just guessing at this point:

1. Download JDK 1.7 (i.e., not _02).

2. Put it into a folder without spaces, i.e., not "Archivos de programa"

Gjk
Back to top
Carlos Hoces
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 1:30 pm    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

I have already tried with 1.7.0 for both NetBeans 7.0 and NetBeans 7.0.1 (all updates up to present), with same results.
I don' believe folders with spaces to be a problem here: NetBeans have been running perfectly under such a configuration, same as applications, in all its versions.
That's the default folder in Windows boxes for application installations, and it's chosen by Java JDK and JRE installers by default.

I will open an issue with the same steps taken in previous post Smile

As usual, thanks for your continuous dedication to helping "poor developers" to find our way! Smile


El 02/10/2011 14:24, Geertjan Wielenga

Quote:
On 10/02/2011 02:21 PM, Geertjan Wielenga wrote:
Quote:
E:\Archivos de programa\Java\jdk1.7.0_02
Maybe two things you can try, but just guessing at this point:

1. Download JDK 1.7 (i.e., not _02).

2. Put it into a folder without spaces, i.e., not "Archivos de programa"

Gjk


--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay
Back to top
Carlos Hoces
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 1:41 pm    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

Bug opened for this issue, as:
http://netbeans.org/bugzilla/show_bug.cgi?id=202945

Quote:
--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay
Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Sun Oct 02, 2011 1:45 pm    Post subject: [platform-dev] Re: Version 7.0.1 does not seem to support version 7 very well. Reply with quote

On 10/02/2011 02:49 PM, Carlos Hoces wrote:
Quote:
Bug opened for this issue, as:
http://netbeans.org/bugzilla/show_bug.cgi?id=202945

Quote:
--
Carlos Hoces
jPlay development
http://www.javaforge.com/project/jplay
All those steps are completely unnecessary. All you need to say is: "I open Module Properties, and under Sources I want to select the Source
Level: I do not have the 1.7 choice in the ComboBox presented."

Gj
Back to top
fairce



Joined: 20 Sep 2011
Posts: 20
Location: Ypsilanti, MI

PostPosted: Sun Oct 02, 2011 1:56 pm    Post subject: Here is the detail of the problem. Reply with quote

When I startup NetBeans, I do not get the splash screen, but I have a little piece of software that usually suppresses those. The Start Page shows with the Featured Demo listing "JDK 7 Supports in NetBeans IDE 7.0" showing. The About box shows the Netbeans IDE 7.0.1 picture with the blue background. The text in the lower box is

    Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
    Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
    System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
    Userdir: C:\Users\Edward Fairchild\.netbeans\7.0


I am not sure if this has anything to do with it, but I have two different 7.0.1 install packages. The original is called jdk-7-nb-7_0_1-windows-ml.exe and is 164,238KB in size, which I downloaded on 8/8/2011. Since I am new to both Java and NetBeans and was having so many learning curve problems, I ended up downloading another posted version named netbeans-7.0.1-ml-windows.exe size 249,888KB, which I downloaded on 9/19/2011. The second, though, would not post my System.out.println calls to the Output window, so it got uninstalled and I went back to the first, which worked fine and didn't have that issue. Attached as Netbeans 1.0.7 Java 7 problem 1.jpg is what I see on the Properties dialog box for one of my modules in my project. As you can see, only 1.4, 1.5, and 1.6 is listed. Java 1.7 just isn't there. So after tracking what changed when I selected one of those values, I found that project.properties was holding that value, so I changed it to 1.7. This is what is in there now:

    javac.compilerargs=-Xlint -Xlint:-serial
    javac.source=1.7


If I go back to the Properties dialog box, it shows 1.4, but all the 1.7 features compile correctly. If I change anything while on that dialog box, such as add a NetBeans library, then the javac.source line in project.properties file gets deleted and I then get compile errors and have to replace it.

My second attachment named Netbeans 1.0.7 Java 7 problem 2.jpg shows what is in my Java directory. JDK 1.7 is there plus some older 1.6 versions that I have not gotten rid of, but which I didn't think would matter.

So for the moment, I am limping along OK, but it is rather a nuicance.



Netbeans 1.0.7 Java 7 problem 2.jpg
 Description:
Java directory currently.
 Filesize:  41.99 KB
 Viewed:  4733 Time(s)

Netbeans 1.0.7 Java 7 problem 2.jpg



Netbeans 1.0.7 Java 7 problem 1.jpg
 Description:
Module Properties dialog box showing no choice for 1.7 Java.
 Filesize:  49.14 KB
 Viewed:  4733 Time(s)

Netbeans 1.0.7 Java 7 problem 1.jpg


Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo