luminus-framework / luminus-framework/luminus
java.lang.ClassNotFoundException error when project has java source files
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 626
- Forks
- 122
- PR merge metrics
- No merged PRs in 30d
Description
I created a basic luminus app using
lein new luminus myapp
and added
:java-source-paths ["src/java"] in project.clj file
and added a simple java file
src/java/com/example/Hello.java
```
package com.example;
public class Hello
{
public static String getFoo()
{
return "foo";
}
}
```
In src/clj/myapp/routes/home.clj, I'm referencing this function getFoo()
When I run
lein javac
It gives me an error
java.lang.ClassNotFoundException: com.example.Hello
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the setup from project.clj using :java-source-paths ["src/java"], src/java/com/example/Hello.java, and the reference from src/clj/myapp/routes/home.clj. Start by running lein javac and inspect how the Java source path and compiled class are handled. Done means the example compiles and com.example.Hello.getFoo() can be resolved without ClassNotFoundException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100