Skip to content

Java newbies #2

@tothpaul

Description

@tothpaul

Hello,

thank you very much for your videos they are great ! I'm french but I understand well what you says and I like it !

now I try to compile this project with the help of your OpenGL Tutorial 1...

from your tutorial, I've put the src folder of this project and renamed it to "main" because of an error about package main...I've used the Build Path option to move the jar to the Referenced Libraries...after a lot of try and fail, I have an application that do compile (yes !) but the application crash

Couldn't get reader for /geometryTerrain/terrainVertex.glsl
Could not read file.
java.lang.NullPointerException
at java.base/java.io.Reader.(Reader.java:168)
at java.base/java.io.InputStreamReader.(InputStreamReader.java:76)
at utils.MyFile.getReader(MyFile.java:58)
at shaders.ShaderProgram.loadShader(ShaderProgram.java:86)
at shaders.ShaderProgram.(ShaderProgram.java:30)
at rendering.TerrainShader.(TerrainShader.java:22)
at geometryTerrain.GeometryTerrainGenerator.(GeometryTerrainGenerator.java:55)
at main.LowPolyDemoApp.main(LowPolyDemoApp.java:31)

It's probably nothing complex but I don't know how Java handles file paths (where is the root ?), I've tried to copy the file in bin/main/geometryTerrain, in c:\geometryTerrain but it still don't work

in Eclipse I have this organisation

GameEngine
 /main
   /flatTerrain
   /generation
   /geometryTerrain
     GeometyTerrainGeneration.java
     terrainFragment.glsl
    ...
   /indicesGenerators
   ...

I can see also the file in the bin/geometryTerrain directory along with the class file, the main class is in bin/main

can you see the problem ?

Thanks
Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions