score:1
the problem is that in intellij, the compilation target is the project folder itself
when building project/module, the ide includes into compile classpath all files/sources from the folders which are marked as source/resource/generated source/test source etc type.
also note that for the case of a maven (gradle) projects ide takes configuration, including compiler configuration, from the maven pom.xml files. by default maven will not process (copy) resource files from the directory with sources. you need to explicitly configure it in pom.xml or move the resource files into folder that will be of a resource type.
now about the main question:
...manually editing the run configuration so that the working directory is in the module root.
my question is, can i somehow change intellij to have this behavior by default for every project instead of having to manually do it every time?
Source: stackoverflow.com
Related Query
- How to default the working directory for JUnit launch configurations in Eclipse?
- How to add Projects to Default Window Working Set in Eclipse
- IntelliJ: How to set default working directory?
- Default working directory for JUnit test - how can we define it consistently in Eclipse?
- How to set the working directory when running an executable in Eclipse CDT to be the same as the executable?
- How to set default editor tab in Eclipse?
- How to delete a java working set in Eclipse
- How to set a breakpoint on a default Java constructor in Eclipse?
- How to set 'File Search' as the default dialog when pressing CTRL + H in Eclipse or STS?
- Default eclipse working directory
- How can I set Chrome as default external browser in Eclipse for Mac?
- Eclipse - how to simultaneously switch working set for project explorer, call hierarchy, and search?
- Set default directory of Pydev interactive console?
- How to set default Maven's Java in Eclipse?
- How to configure the "initial working directory" of the Terminal to be by default the same location as the current opened project?
- How can I set the default code formatting and template for a new workspace
- How to move Egit repository and working directory
- VS Code: How to set semantic syntax coloring like Eclipse does. Default syntax coloring does not do this
- Pydev in Eclipse default working directory
- Eclipse - How to set default System Library
- How to set the parent directory of the basedir in maven as the basedir of ant?
- How can I get eclipse to default to 'deselect working set'
- How to set multiple default source folders in Eclipse IDE for Java?
- How to set the default debug memory view rendering and cell size in Eclipse CDT?
- How do I make the default bin directory visible in Eclipse?
- How to change tomcat default deployment directory in Eclipse?
- How to set IntelliJ Idea to run simple java application?
- How Do You Set Eclipse's Default Settings for When You Create New Workspaces?
- How set local directory as SVN Repository in Eclipse Luna
- SVN/Eclipse "Show Annotations" -- how to set this to default
More Query from same tag
- How to change the way eclipse showing suggestion?
- Endless builds with eclipse
- Eclipse 3.8: where is the download site?
- Java SWT TreeViewer with one column that needs to be StyledText
- How can I tell Eclipse to import files from outside the current Java Web Project?
- Variable not declared in this scope on Eclipse IDE C++
- Jar does not run despite specifying correct main class, classpath, etc
- New Java class doesn't work. What am I doing wrong?
- ORA-12505, TNS:listener does not currently know of SID
- Failure to create Axis2 service in Eclipse WTP, Failure to create Axis2 service in Eclipse WTP, NoClassDefFoundError -CatalogManager
- Eclipse - Java, casting from double to int
- Android Manifest File Not Picking Up Default Launch Activity
- Overriding acm.program init() method; does Java have to be this hard?
- C# SLN file approach in Eclipse (Java)
- Problems loading 5M instances with Weka API
- Javascript, eclipse and android
- Error in eclipse while importing project from TFS
- How do I select a file within a .app in Mac OS X?
- spring ide and ref hyperlink click doesn't work if bean is defined in different file
- InvalidStackFrameException After Calling Method via ObjectReference#invokeMethod
- How do I configure the ADT plugin in the eclipse
- How can I speed up Eclipse Proposals? they are very slow
- Groovy files throwing ClassNotFoundException in Java Spring Boot application
- Java eclipse directory structure and tomcat
- Anaconda2 ImportError: No module named matplotlib.pylab
- button does not appear for new Android application in eclipse IDE
- ImperativeExpression for ToolItems
- libGdx--Blank black screen when trying to load obj models using libgdx.g3d
- How to deploy a java webapp created in eclipse by spring mvc
- Is there any way I can write (copy-paste) nicely-formatted SQL queries in Java string literals using Eclipse?