I just downloaded Spring tool Suite 3.9 but it is not working with java 8 and wants java 6. Do you know a way to open it with java 8? And please let me know if there is a better free IDE for spring on mac.
It should work as per sts documentation .
https://docs.spring.io/sts/nan/latest/NewAndNoteworthy.html
STS doesn't need a JDK6 to run, it requires a JDK8 instead, so you need to have a full JDK8 installed. STS picks that up automatically while launching.
In case of doubt, you can specify the JVM to run STS with in the sts.ini file in the same way than you can specify the JVM for Eclipse in the eclipse.ini: https://wiki.eclipse.org/Eclipse.ini#-vm_value:_Mac_OS_X_Example
In case this doesn't work, please add additional details about the exact message that you see, when you see it, and what version of macOS you are running. It would also be interesting to see if plain Eclipse behaves the same.
Related
My application isn't running correctly with Java 9. In order to debug it, I upgraded to Eclipse 4.7 (oxygen) since Neon doesn't have Java 9 support, and applied the Java 9 support patch.
After doing so, eclipse was failing to load any of my pre-existing Java Applications. Thinking it might be a version difference thing, I deleted them, to try re-adding. But when I click the "New" button to add a configuration, nothing happens.
If I double-click "Java Application," I get the following error:
An error has occurred. See error log for more details.
tried to access method org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.getTabViewer()Lorg/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer; from class org.eclipse.jdt.internal.debug.ui.launcher.LocalJavaApplicationTabGroup
I am able to add configurations for other types of applications (Java Applet, Eclipse Application) so it seems only to be an issue with Java Applications.
I also tried a fresh workspace, but that has the same issue. How can I fix this?
This is kind of a duplicate but since I experienced the issue and have seen a few others post about it, I'll post my answer of how I fixed it here.
If you go here: https://marketplace.eclipse.org/content/java-9-support-beta-oxygen/
You need to follow the step about updating Eclipse 4.7 from the link that ends in 4.7-U-builds. When you go to Install New Software and select Eclipse SDK, click Next until you get to the Install Remediation Page, and make sure that you are selecting the second option that says something like "update my installation to be compatible with the items being installed" instead of the option that says "keep my installation the same and modify the items being installed to be compatible."
The first time I installed Java 9 updates, I did it the latter way and ran into this problem. Now that I've gone back and chosen the former, I am able to add Java Application Run Configurations again.
Hope this helps.
Eclipse Oxygen.1a (4.7.1a) Release
Update as of 11 October,2017 - You shall upgrade to the latest eclipse package Eclipse Oxygen.1a (4.7.1a) which is marked as released and supports Java 9.
I got this error when I'm trying to create a Java Swing Application, by using Netbeans.
I really don't know how to fix this error. Internet did't give me a really good answer.
I Unistalled Netbeans & then reInstalled. but It doesn't work.
How can I fix this error. Thank you.
I don't have a NetBeans installation at hand, but have a look at your Java installations configured in NetBeans ("Java Platform Manager" in Tools menu?). Select the Java version you are using. There should be a JavaFX tab. I think you can disable it there, if you don't need it.
Note: If you're using the latest Java version from Oracle, then JavaFX should automatically be configured correctly, since JavaFX is now shipped with the JDK.
In Eclipse when i create new Java Project, i see options like:
Now i want to know, what is the safest option to use considering when i export jar file any user will be able to use it. If selecting the shown option, does that mean if someone has JRE 1.6, he will not be able to run that jar file, or is it backward compatible??
As such my project has no specific 1.7 dependencies.
This is very broad question, which JRE to use depends on your requirement. If you have multiple projects, each specific to a JRE, then you can use project specific JRE. If you are happy with eclipse default JRE you can continue. It is purely your decision.
Someone with JRE 1.6 should be able to run on 1.6 as long as compilation level is set to 1.6 (This may flag if your code has any 1.7 features which are not part of 1.6).
If you use features which are specific to JDK 7 (such as the new NIO.2/The path API ) then they most likely won't work on java 6. Furthermore Java 6 has been tested and withstood the test of time as a result most (if not all) bugs have been ironed out. Java 7 is still fairly new and even after it was released there was a pesky bug that showed up couple of days after release which had to the with the loop optimisation. So unless you specifically need JDK7 features I'd suggest you stick with JDK6, on the other hand if your project is not mission-critical then you might experiment with the new JDK7 features given that your user base has JRE 7. Just my 2 cents...
I am running Mac OSX lion and have a Java project in netbeans where I would like to use string switch statements. I downloaded and installed the OpenJDK7 and I think I have configured the project to use the Java 1.7 properly.
In the Project Properties I have set JDK 7 to the platform:
It is showing up as JDK 1.7 in the Libraries section in the Projects Window.
However, I still get a compilation error saying that switch with strings is not supported in 1.6
Am I missing a step here?
To fix this, I followed the very comprehensive tutorial from the netbeans website found here:
http://netbeans.org/kb/docs/java/javase-jdk7.html
Specifically I had forgotten to set the Sources/Binary Format to JDK 7. You can do this in the bottom right of the Sources section of the Project Properties window.
If it's anything like Eclipse, the string case is a language feature, not a library feature.
Eclipse uses its own internal compiler by default and I suspect NetBeans is similar.
So you have to ensure you're using a JDK7 compiler. From a cursory search, the project settings should allow you to set an external compiler.
Are you using 7.0.1 or greater?
NetBeans 7.0.1 provide a hint if you have a chained if-else statement to take advantage of the JDK7 features. Have you downloaded it yet ? Check out screencast #35 highlighting Project Coin features in NetBeans. NetBeans 7.0.1 provide complete tooling around JDK7 and GlassFish 3.1.1 allow you to leverage JDK7 features in your Java EE 6 applications.
http://blogs.oracle.com/arungupta/entry/totd_168_string_switch_statement
Here are some steps:
Select the project you want to change source settings for.
Got to File > Project Properties...
Select the Sources Category.
Change the Source/Binary Format dropdown to whatever format you want to use.
Viola!
When I try to run from eclipse 3.5.2 a "clean" version of JBoss 3.2.1 AS downloaded from it's homepage I get an error message:
JBossTools: JBoss 3.2 Runtime - MOCK:
invalid option -- b
I am using default configuration.
When I launch the same server from console everything runs just fine.
Any ideas what might be the problem?
Jboss 3 is really old, I'd stay away from it if at all possible.
Your error looks to me like eclipse is trying to pass an option that isn't recognized by your version of JBoss. See above.
If you really have to use jboss 3, then you might need to make sure the other software in your toolchain is of the same vintage. Maybe try Eclipse 2.1?