The quickest way of showing line numbers for the code in code editor in Jdeveloper is just right click on the left hand side of code editor and select 'Toggle Line Numbers'.
If you prefer to show line numbers always, you can do that in settings for 'Code Editor: Line Gutter'.
There, you select 'Show Line Numbers' and save the settings. That's it! From next time onwards, the line numbers will be displayed in the code editor.