Cheers
congratulations on a new year.
I want to learn to write coding in Java language
if you offer me suggestions of where to find the "jdk" for puppy bionic 64 and where to find tutorial to install it ..
also where you could find tutorials to write the scripts,with simple examples to get the idea.
Thanks for your suggestions.
I want to write programs in java
Moderator: Forum moderators
-
- Posts: 37
- Joined: Mon Oct 05, 2020 3:48 am
I want to write programs in java
- puppy_apprentice
- Posts: 692
- Joined: Tue Oct 06, 2020 8:43 pm
- Location: land of bigos and schabowy ;)
- Has thanked: 5 times
- Been thanked: 115 times
Re: write code program in java ..
Currently using Slacko64 6.3.2 but take a look at Utility/Get Java Runtime/Development.
- puppy_apprentice
- Posts: 692
- Joined: Tue Oct 06, 2020 8:43 pm
- Location: land of bigos and schabowy ;)
- Has thanked: 5 times
- Been thanked: 115 times
Re: I want to write programs in java
If you didn't start yourself i have quick tutorial for you:
1) Download and load:
jre-8u201-x64_xz.sfs
2) Download and load:
jdk-8u201-x64_xz.sfs
3) Read and follow instructions eg. on this page:
https://www.tutorialspoint.com/java/jav ... syntax.htm
- Attachments
-
- java-hello.jpg (33.31 KiB) Viewed 1390 times
- deki20
- Posts: 22
- Joined: Sun Nov 15, 2020 7:21 pm
- Location: Denmark
- Has thanked: 2 times
- Been thanked: 3 times
Re: I want to write programs in java
netbeans.org, fun place to explore.
NetBeans IDE is a tool.
I've used it when I coded java.
How to set it up/install in puppy, is a different story.
Maybe it's available through puppy package manager.
Good luck
Edit:
Also, one of getting started tutorials
https://www.w3schools.com/java/default.asp
-
- Posts: 37
- Joined: Mon Oct 05, 2020 3:48 am
Re: I want to write programs in java
Thanks for the suggestions!
puppy_apprentice,
I already downloaded and loaded jdk ..sfs (and .. jre..sfs) with Load-sfs on the fly
but to command
#javac MyFirstJavaProgram.java
--> gives the message -->> bash: javac: command not found
in which path is the javac file located?
Thank you again
- puppy_apprentice
- Posts: 692
- Joined: Tue Oct 06, 2020 8:43 pm
- Location: land of bigos and schabowy ;)
- Has thanked: 5 times
- Been thanked: 115 times
Re: I want to write programs in java
I've tested those .sfs with Slacko64 6.3.2 and Bionic64 7.9.8 and everything works. Check hashes for those files if they are not corrupted:
Code: Select all
jdk-8u201-x64_xz.sfs
61f30bafda69b765983f73aa87e94005
jre-8u201-x64_xz.sfs
dea6da958b718d8a1eecf0933b56c276
You can check where javac or java is via command in terminal:
Code: Select all
which javac
which java
-
- Posts: 37
- Joined: Mon Oct 05, 2020 3:48 am
Re: I want to write programs in java
thanks puppy_apprentice!
I already took the first step
I run the following commands:
#javac MyFirstJavaProgram.java
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
#java MyFirstJavaProgram
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
Hello World <--this well
---------------------------
but I get that error message ..
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
What could be the problem?
Thanks!
- puppy_apprentice
- Posts: 692
- Joined: Tue Oct 06, 2020 8:43 pm
- Location: land of bigos and schabowy ;)
- Has thanked: 5 times
- Been thanked: 115 times
Re: I want to write programs in java
I've checked my .sfs files in new Slacko 7.0 and have the same problem like you earlier: no javac. It seems that those .sfs are incompatible with newer puppies like Bionic 8.0 and Slacko 7.0. Maybe something was changed with .sfs loader or woof-ce.
And your new error is strange because you are compiling console program and Swing is library for graphics. You can check if you don't have loaded another .sfs with Java eg. OpenOffice/LibreOffice (if i remember they use some java stuff). But i think that it is incompatibility.
So you have to use earlier puppies with my .sfs or find proper versions for Bionic 8.0.
- puppy_apprentice
- Posts: 692
- Joined: Tue Oct 06, 2020 8:43 pm
- Location: land of bigos and schabowy ;)
- Has thanked: 5 times
- Been thanked: 115 times
-
- Posts: 37
- Joined: Mon Oct 05, 2020 3:48 am
Re: I want to write programs in java
Cheers
and what is the command equivalent to javac and java in OpenJDK
thanks
- puppy_apprentice
- Posts: 692
- Joined: Tue Oct 06, 2020 8:43 pm
- Location: land of bigos and schabowy ;)
- Has thanked: 5 times
- Been thanked: 115 times
Re: I want to write programs in java
Should be the same. This Open Source version of those .sfs from me.
Re: I want to write programs in java
puppy_apprentice wrote: Thu Jan 07, 2021 12:12 pmIf you didn't start yourself i have quick tutorial for you:
1) Download and load:
jre-8u201-x64_xz.sfs
2) Download and load:
jdk-8u201-x64_xz.sfs
@puppy_apprentice I tried to download the files but I think the link is bad, I see the number '404' in big and the website is not in english. I would like to try your sfs files too. Thanks for sharing
Michel
Re: I want to write programs in java
arivas_2005 wrote: Wed Jan 06, 2021 10:27 pmCheers
congratulations on a new year.
I want to learn to write coding in Java language
if you offer me suggestions of where to find the "jdk" for puppy bionic 64 and where to find tutorial to install it ..
also where you could find tutorials to write the scripts,with simple examples to get the idea.
Thanks for your suggestions.
Hello arivas_2005, I would like to suggests a book that I find very good and complete. It is a textbook online at https://math.hws.edu/javanotes/
If you prefer videos you can watch this tutorial in about 2.5 hours, it covers the basics with very good examples easy to undeerstand
Michel
- puppy_apprentice
- Posts: 692
- Joined: Tue Oct 06, 2020 8:43 pm
- Location: land of bigos and schabowy ;)
- Has thanked: 5 times
- Been thanked: 115 times
Re: I want to write programs in java
michel804 wrote: Tue Feb 02, 2021 1:56 am@puppy_apprentice I tried to download the files but I think the link is bad, I see the number '404' in big and the website is not in english. I would like to try your sfs files too. Thanks for sharing
Michel
This file storage service holds files only for 7 days. I will try upload them today evening again.
jdk-8u201-x64_xz.sfs
jre-8u201-x64_xz.sfs
Again 7 days to expire.