JBoss Developer Studio MAVEN project - jboss

If I create a new maven project named "getting-started" of type maven-archetype-webapp with the JBoss Developer Studio, then I get the following warning:
Description Resource Path Location Type
Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. getting-started Build path JRE System Library Problem
I installed Java SE 7 and set the system variable Java_Home to the jdk directory. Also I set by the installation wizard of JBoss DS the path to the jdk directory.

Check the Java Build Path for the project:
1. In JBoss Developer Studio, right-click the project.
2. Click Properties.
3. On the left, click Java Build Path.
4. On the Libraries tab, select the current JRE System Library and click Remove.
5. Click Add Library to add a different JRE System Library (you should be able to select the Workspace default JRE).

Related

createbundle command line refuses to generate Mac bundle on Windows

https://stackoverflow.com/a/57802270/6944068 says "You can generate macOS JRE bundle on Windows."
However, my attempt failed, see transcript:
C:\develop\projects\id-gui\target\downloads\jre-bundles>..\install4j8.0.8\bin\createbundle C:\develop\projects\id-gui\target\downloads\jre-bundles\zulu11.41.24-sa-jdk11.0.8-macosx_x64
The JRE bundle wizard can only create JRE bundles for the platform you're currently running on.
The java home directory C:\develop\projects\id-gui\target\downloads\jre-bundles\zulu11.41.24-sa-jdk11.0.8-macosx_x64 contains a JRE for a different platform.
What's wrong?
The cross-platform generation only applies to bundles that are generated via the mechanism configured on the "General Settings->JRE bundles" step. The createbundle command line tool creates "pre-created JRE bundles", in the install4j IDE you would do the same with "Project->Create a JRE bundle". Those bundles can only be generated on the platform that they are intended for because they rely on a working local installation.

Bundle Jre downloaded as maven dependency with Install4J

I am using maven to build my install4J project. I am downloading jre.tar.gz into my project using a Maven dependency. I want to bundle this Jre with Install4J.
I have created a compiler variable bundleJRE which is the path to the jre.tar.gz file, and I created the installer executable.
While installing on a non-java machine, I get an invalid JRE error. Do I need anything else to be configured? How can I bundle this?
We have the same way to build our installer with maven. If the jre is packed correctly ensure the search sequence for the JRE is set to the installation folder first (or only). You can configure that in the "General Settings -> Java Version" configuration tab. We only added the installation folder and deleted all the other entries. Also ensure the minimum java version matches with your bundled one.

Change enviornment to JDK in Eclipse Luna

I am using Eclipse Luna (Java EE IDE). I need to add jdk because my project is been converted to maven. Whenever , I install maven console gives an error
No compiler is provided in this environment. Perhaps you are running
on a JRE rather than a JDK?
So i used Preference>installed jre's. However , when i am trying to change JRE to JDK by using Search button in Installed jre's. It shows me only JRE not JDK. Although , i am providing JDK path.
In short , I need to change my environment to JDK.
Thanks. Please help me out
In the preferences screen, remove the JRE listed there.
Add > Standard VM + Next > Directory + navigate to the jre directory inside jdk folder and Finish
If done right then JRE Home should look like "C:\Program Files\Java\jdk1.8.0_05\jre", NOT "C:\Program Files\Java\jre8"
Next, make sure you have the new JRE System Library listed under the Libraries tab in Java build path and in the Java Compiler (right click on project > properties) you define enable project specifics and set Compiler compliance level to the version you want.
Hope it helps.
Just open: Window-> Preferences ->Installed JREs and press SEARCH. Chose a folder and eclips find all avaliable jre and sdk.

Using both jdk 1.6 and jdk 1.7 for different projects in Eclipse

I am using Eclipse with JDK 1.7. My previous projects are developed in java 7 and JDK 1.7.
Now, I want to build a new project under JDK 1.6 in Eclipse. Is it possible to do that so that some projects are based on JDK 1.7 and some others are based on JDK 1.6 without conflicts?
If this can be done, please let me know how to do it step by step.
Update:
My default JDK is 1.7. I created a new project that is based on jdk1.7 by default. And then I go to the property of this project, and then java compiler, then change the compliance settings as the image shows below. But there is some error occurred. What could be the reason causes this error?
The following is the "problem" view
After some research, I have solved this problem. please see the reference about how to fix the facet version.
You can set overall workspace properties to use one version of Java and set individual project properties to use another.
To set overall workspace properties, click on Window > Preferences, then navigate to Java > Compiler.
To set project properties, right-click on the project and select Properties. Navigate to Java Compiler and check "Enable project specific settings"
You can choose from among the installed JREs for either setting. To tell Eclipse about a newly installed JRE, you can open the workspace preferences and navigate to Java > Installed JREs and then click the "Add" button.
You can change the JDK used by project under Project properties(alt+enter)-> Installed JREs. Also Debug Configuration is your friend. You can set what JDK to use when launching/running an app/program in Eclipse.
This can be done for an Eclipse Run Configuration. You may define multiple such configurations, each of which will reference a "main class" in one of your projects.
In Window -> Preferences -> Java -> Installed JREs define a location for each JRE/JDK.
For a given Eclipse project:
right click on the project, select Properties -> Java Compiler, override and set compiliance level settings.
Check Use compliance from ..., visit the Java Build Path and be sure you have a JRE Library set that matches the desired compliance level.
For a given Eclipse Run Configuration: Run -> Run Configurations... -> Java Application, select an old or create a new configuration, select the JRE tab and specify the Runtime JRE.

Setting JRE in Netbeans

I have JDK 1.6, JRE6 and JRE7 (64-bit & 32-bit) installed in my PC.
I am using Netbeans 7.3 BETA 2 and it is using JDK 6 and JRE 6.
I want to change it to JRE7. How can i achieve this ?
I have checked in Stackoverflow itself and found that we have to change the netbeans.conf file content for the netbeans_jdkhome value to the path of new Java path.
In another stackoverflow question, I found How to specify which JRE to use in Netbeans?.
But, in this also, I am not able to find how to get this resolved. Can anybody help on this ?
My installation path is as follows,
JDK6 path - C:\Program Files (x86)\Java\jdk1.6.0_31
JRE6 path - C:\Program Files (x86)\Java\jre6
JRE7 path - C:\Program Files (x86)\Java\jre7 (32-bit)
JRE7 path - C:\Program Files\Java\jre7 (64-bit)
Thanks in advance.
Goto Tools -> Platforms
Click "Add Platform", browse to the location where the JDK you want to add is installed....
Click on the JDK you want to add and select "Finish"
Updating projects
You can change the platform that projects use, by right clicking the project node and selecting properties and selecting Libraries. Here you change the platform that the project will use to build the classes with.
You can also change the source/binary format (version) which Netbeans is expecting to use. For example, you use JDK 7, but build/develop for Java 6
Changing the JDK that Netbeans itself uses to run
Goto {install/location/of/Netbeans}/etc and open the netbeans.conf.
There is a property called netbeans_jdkhome (it was towards the end of my file). You change this to what ever JDK you want Netbeans to be launched with