Page 1 of 1

I want to write programs in java

Posted: Wed Jan 06, 2021 10:27 pm
by arivas_2005

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.


Re: write code program in java ..

Posted: Wed Jan 06, 2021 10:56 pm
by puppy_apprentice

Currently using Slacko64 6.3.2 but take a look at Utility/Get Java Runtime/Development.

https://www.google.com/search?q=java+tutorials


Re: I want to write programs in java

Posted: Thu Jan 07, 2021 12:12 pm
by puppy_apprentice

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


Re: I want to write programs in java

Posted: Thu Jan 07, 2021 11:02 pm
by deki20

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 :thumbup:

Edit:
Also, one of getting started tutorials
https://www.w3schools.com/java/default.asp


Re: I want to write programs in java

Posted: Fri Jan 08, 2021 2:05 am
by arivas_2005

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


Re: I want to write programs in java

Posted: Fri Jan 08, 2021 7:57 am
by puppy_apprentice

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

Re: I want to write programs in java

Posted: Fri Jan 08, 2021 10:58 pm
by arivas_2005

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!


Re: I want to write programs in java

Posted: Sat Jan 09, 2021 3:10 pm
by puppy_apprentice

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.


Re: I want to write programs in java

Posted: Sun Jan 10, 2021 8:13 am
by puppy_apprentice

Or you can try OpenJDK:
viewtopic.php?p=8935#p8935


Re: I want to write programs in java

Posted: Sun Jan 10, 2021 7:53 pm
by arivas_2005

Cheers
and what is the command equivalent to javac and java in OpenJDK
thanks


Re: I want to write programs in java

Posted: Sun Jan 10, 2021 8:55 pm
by puppy_apprentice

Should be the same. This Open Source version of those .sfs from me.


Re: I want to write programs in java

Posted: Tue Feb 02, 2021 1:56 am
by michel804
puppy_apprentice wrote: Thu Jan 07, 2021 12:12 pm

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

@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

Posted: Tue Feb 02, 2021 1:59 am
by michel804
arivas_2005 wrote: Wed Jan 06, 2021 10:27 pm

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.

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


Re: I want to write programs in java

Posted: Fri Feb 05, 2021 2:04 pm
by puppy_apprentice
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.