#How can I add Java to an existing Python project?
12 messages · Page 1 of 1 (latest)
Project ID: 823ace55-3f7f-426a-827e-13063872144b
823ace55-3f7f-426a-827e-13063872144b
Should be able to use https://nixpacks.com/docs/configuration/environment NIXPACKS_LIBS to add java
App source + Nix packages + Docker = Image
Try setting that variable to jdk
We’ll make this more UI driven/better over the next bit but that’s how it is for now
Awesome thank you Cooper! That would go in a railway.toml file, correct? Does the railway.toml override my existing build/run commands? i.e. do I have to specify just the NIXPACKS_LIB in the toml or any existing settings I have in the GUI as well?
You can just add it to the Variables in the service
Ah I see, thank you!
Hey Cooper, I added the env var:NIXPACKS_LIBS with a value of jdk In the build logs, there are two lines referencing jdk: ```#8 17.50 /nix/store/500hgnsk77cs40fmhmq3hv47kyvfaq69-openjdk-17.0.4+8
#8 46.28 copying path '/nix/store/500hgnsk77cs40fmhmq3hv47kyvfaq69-openjdk-17.0.4+8' from 'https://cache.nixos.org';...
However, I still get the same Python error in the deploy logs:
```FileNotFoundError: [Errno 2] No such file or directory: 'java'```
Any ideas?
Try doing NIXPACKS_LIBS instead of PKGS?
That got it, thanks Cooper!