stevennathaniel

Log Membuat Project Java Dengan Package

Apr 27th, 2016
89
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tutorial package java:
  2.  
  3. http://www.tutorialspoint.com/java/java_packages.htm
  4.  
  5. akhirnya berhasil bikin file java yg ada nama package nya, di bawah ini log terminal nya:
  6.  
  7. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ javac -d ~/ProyekAnt/Latihan6/ balikpapan.java
  8. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ ls
  9. balikpapan.java mobil
  10. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ cd mobil
  11. steven@steven-N43SM ~/ProyekAnt/Latihan6/mobil $ ls
  12. balikpapan.class
  13. steven@steven-N43SM ~/ProyekAnt/Latihan6/mobil $ cd ..
  14. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ ls
  15. balikpapan.java mobil
  16. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ java -cp ~/ProyekAnt/Latihan6/mobil balikpapan.java
  17. Error: Could not find or load main class balikpapan.java
  18. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ java -cp ~/ProyekAnt/Latihan6/mobil balikpapan
  19. Error: Could not find or load main class balikpapan
  20. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ java balikpapan
  21. Error: Could not find or load main class balikpapan
  22. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ cd mobil
  23. steven@steven-N43SM ~/ProyekAnt/Latihan6/mobil $ ls
  24. balikpapan.class
  25. steven@steven-N43SM ~/ProyekAnt/Latihan6/mobil $ java balikpapan
  26. Error: Could not find or load main class balikpapan
  27. steven@steven-N43SM ~/ProyekAnt/Latihan6/mobil $ java mobil.balikpapan
  28. Error: Could not find or load main class mobil.balikpapan
  29. steven@steven-N43SM ~/ProyekAnt/Latihan6/mobil $ cd ..
  30. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ ls
  31. balikpapan.java mobil
  32. steven@steven-N43SM ~/ProyekAnt/Latihan6 $ java mobil.balikpapan
  33. Hello World
  34. steven@steven-N43SM ~/ProyekAnt/Latihan6 $
RAW Paste Data