I would like to buy a relatively cheap computer [$100-$300 USD) to run Minecraft java edition.Does anyone have any recommendations. At first I would have liked it to have been a desktop but a I have seen no cheap desktops so a laptop would also work.
You could try an Intel NUC system which would cost you $162.05, has a 2ghz processor with 2 cores according to the specs.
I doubt that will run the game well unless you are planning on running an old version like 1.6.4; the CPU in the system you link to has half the single-thread rating and 1/5 the overall rating as the recommended CPU:
CPU: Intel Core i5-4690 3.5GHz / AMD A10-7800 APU 3.5 GHz or equivalent
GPU: GeForce 700 Series or AMD Radeon Rx 200 Series (excluding integrated chipsets) with OpenGL 4.5
Note that newer does not mean better (2018 for the J4005 vs 2014 for the i5-4690), especially since single-core CPU performance hasn't improved much at all for many years. Versions since 1.8+ also really need a quad-core CPU to run well; even older versions would benefit since singleplayer runs two main threads for the client and sever, then you want garbage collection to have another thread (on my old computer, with a dual-core CPU, Optifine's multithreaded chunk rendering worsened performance, likely due to not enough CPU cores to handle it, likewise, vanilla has used multithreaded chunk rendering since 1.8 and there was a severe performance degradation). I'd also consider the recommended requirements to be the real minimum, considering that you should also have the render distance set to at least 10 chunks to ensure the game runs properly; e.g. mob spawning. At least in my case this means you should get a steady framerate at whatever refresh rate you have)
He did say he wanted a computer that costs within the budget of 100 to 300$, so his options will be very limited for that kind of budget, desktop or laptop it doesn't matter, he isn't getting a high end computer with that budget.
Better to advise the saving of more money than to push a machine that is not sufficient to the stated goal.
PS he'd be better off doing like this guy:
...and buying used; it'd be a much more capable machine than a brand new NUC.