This assumes that you have gone through “Setting up Java, Maven, and Eclipse”
#1. Creating the source folder like src/main/java, src/main/resource, etc via eclipse IDE
To create a new source folder under src/main/, right mouse click on project say “simple”.
Alternatively, you can highlight the project under which you want to create a “source folder” and then select “File –> New –> Source Folder” from the main menu or right click on the project to get the contextual menu, and then do “New –> Source Folder“.
#2. Where are my class files created?
#3.How do I correlate to the underlying file system?
Right mouse click on the “Simple” project to get the “contextual menu” for the project. Then select “resource”
In the file system outside eclipse, you can see
The pom.xml based Maven jar dependencies are under the libraries tab.
#4. How is Maven configured within eclipse?
1) You can check this on a global level via top main menu: Window –> Preferences
2) or on project level via project specific contextual menu: by right mouse clicking on the project and then select “properties”.
Also make sure that your eclipse installation has the Maven plugin m2e (Maven eclipse plugin).
#5. How do you check the compiler and JRE versions or change JRE?
Window –> Preferences
This is a global change. You can also do it at a project level by “right mouse clicking”, and then selecting “Properties –> Java Compiler“. For JRE, “Properties –> Java Build Path –> Libraries (tab) –> Select the JRE –> Edit (button) –> change the JRE for this project”
#6. How to run a Java file with the main method?
Select the Java source file to run, right mouse click, and from the contextual menu select “Run As” –> “Java Application”
#7. How to inspect Eclipse IDE JVM version and JVM args like memory, etc?
Go to your file system where Eclipse is installed (e.g. C:\TOOLS\eclipse\eclipse-4.3), and open the “eclipse.ini” file
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
-startup plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130521-0416 -product org.eclipse.epp.package.jee.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile --launcher.appendVmargs -vm c:/Tools/java/jdk1.6.0_45/jre/bin/server/jvm.dll -vmargs -Dosgi.requiredJavaVersion=1.6 -Declipse.p2.unsignedPolicy=allow -Xmn128m -Xms2056m -Xmx2056m -Xss1m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+UseParallelGC -XX:+UseFastAccessorMethods -Dcom.sun.management.jmxremote -XX:ReservedCodeCacheSize=64m |












