Jump to content

Search the Community

Showing results for tags 'java'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News and Announcements
    • News
  • General
    • Suggestions & Feedback
    • General Chat
    • GFX
    • VFX
  • MMO Hub
    • Gamer's Lounge
    • Member's Lounge
    • Developer Lounge
    • Premium Lounge
  • MMO Corner
    • World of Warcraft
    • Lineage 2
    • Minecraft
    • Host Listing
    • Server Listing
    • Server Recruitment
    • Server Reviews
    • The Underground
  • User Hub
    • Support
    • Report
    • Contact Staff
  • Merchant Corner
    • Marketplace
  • General Development Releases
  • Tutorials
  • Wasteland


  • Creative Corner
    • GFX Releases
    • VFX Releases
    • Resources
  • MMO and MMORPG
    • World of Warcraft
    • Lineage 2
    • Minecraft
  • Webmasters
    • Content Management Systems
    • Addons
    • Scripts
    • Designs
    • Proxies
    • HTML
  • Applications
  • Gaming
    • World of Warcraft
    • Lineage 2
    • Minecraft
    • Emulation
    • Nulled Distributions
  • Marketplace
    • Marsh Designs
    • iDarts

Product Groups

  • Membership
  • Advertise
  • Promote

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




How Did You Find Us?



Found 10 results

  1. Hey, Lordcraft Users! I'd like to welcome you to the first of a series of Java tutorials hand written by yours truly. They are going to be a Lordcraft exclusive and hopefully, everyone will find them useful. Going through these tutorials, I'll be assuming each and every one of you is brand new to both programming and Java. If you are already well versed in either of these subjects, feel free to wait around for the next bit of tutorials. ------- *** ------- Chapter I: Preparing Your System In order to get started with Java programming, you need a few tools installed on your system. Depending on your operating system, you may install things a little bit different then I am. I am using a Windows based laptop, so I'll be showing how a Windows user will setup their system. However, if you use a Mac or run Linux, comment below and I'll help you install everything. Programs: JDK - JDK 8 and JDK 9 IDE - NetBeans or IntelliJ or Eclipse I listed five programs above that you guys may be interested in. Right now, you probably have no idea what a JDK or IDE is, and that's okay. We'll go over that. For now, I recommend you download JDK 8 and Netbeans. I'll be using Netbeans in all of my tutorials since my university requires my program of study to use it for the Java language. Plus, it's super easy to use. Installing the JDK Step 1: Go to the downloads page and download JDK 8u152. (Don't forget to accept the License Agreement and pick the correct download for your system)! Step 2: Run the downloaded JDK application. Depending on your operating system, the way you'll do this may vary. Windows users will run the .exe file, Linux kernals will run it from the console (most distributions will run the tar.gz version), and Mac users will run the .dmg file. Links: Windows or Linux or Mac Step 3: Run through the installer, it's pretty easy. Just pressing "next" will be enough. Step 4: Congratulations! You've installed the required JDK application! Installing the IDE Step 1: Go to the downloads page and download Java SE Step 2: Run the Netbeans installer, depending on your operating system, the installed product will be different. You'll run it the same way you ran your JDK installer. Step 3: Accept the licensing agreement, pick your installation path, and check for updates (this will save you time later on). After that, let the installer do it's job. Step 4: Congratulations! You installed the required IDE! Now we can start programming... Almost. ------- *** ------- Chapter II: What Is a JDK and IDE? So now you're probably wondering what a JDK and IDE and why we need them. In short, a JDK (Java development kit) is a subset of a SDK (software development kit). The JDK offers a variety of tools for developing, debugging, and monitoring java applications. Essentially, it's the core behind the Java language. Without a JDK, you can't have your Java code. But what about an IDE? If the JDK gives us the ability to develop Java code, why do we need this? Well, an IDE (integrated development environment) is a program that allows you to easily make project files, test your source code, read error text, catch errors in code before runtime, and hosts a debugger. Not only that, but an IDE offers a quick and responsive function that builds your sourcecode into computer-readable binary, which then turns into an executable code. There's a lot more information about both the JDK and IDE, but all you really need to know is that a Java IDE requires an updated JDK in order to properly integrate Java code into programs. ------- *** ------- If you have any questions, leave a comment or contact me on Discord!
  2. Hello, In this tutorial I just wanna paste a very simple script for Rock, Paper, Scissors var userChoice = prompt("Do you choose rock, paper or scissors?"); var computerChoice = Math.random(); if (computerChoice < 0.34) { computerChoice = "rock"; } else if(computerChoice <= 0.67) { computerChoice = "paper"; } else { computerChoice = "scissors"; } console.log(computerChoice); var compare = function(choice1, choice2) { if (choice1 === choice2) { return "The result is a tie!"; } else if (choice1 === "rock") { if (choice2 === "scissors") { return "rock wins"; } else { return "paper wins"; } } else if (choice1 === "paper") { if (choice2 === "rock") { return "paper wins"; } else { return "scissors wins"; } } else if (choice1 === "scissors") { if (choice2 === "rock") { return "rock wins"; } else { return "scissors wins"; } } }; compare(userChoice, computerChoice); Any questions? you can put them in the reply I will try to answer on it
  3. So i decided to download and install eclipse in order to code java for MineCraft side plugins but when i opened up the eclipse application, this shows up: Am i supposed download JRE 1.8 and JDK 1.8 or something? I'm not sure what to download, please help me out whoever is experienced with this already.
  4. Hello members of LordCraft, here is a guide on how to add Java codes in eclipse. Part 1 (Add Multifunction Zone) Part 2 (Add Multifunction Zone) Credits: WolfGiaS3na
  5. Epicblood

    Java Maps

    Good day class, Today I will be talking about the various maps in Java, and how/when to use them. Forgive me if I kinda ramble, just kinda making this up as I go. Before I get started, I recommend using an IDE such as IntelliJ IDEA Let's start with a Hashmap. These are the most common maps in java and imo the simplest/most versatile. you define a Hasmap like so: HashMap<Integer, String> myMap = new HashMap<Integer, String>(); So, what have we done here? We made an object, called it myMap, and told it the key is going to be an Integer, and the value is going to be a String. Now we can start using it like so: myMap.put(0, "Epicblood"); myMap.put(1, "iDeath"); myMap.put(2, "someOtherFag"); Cool, we added values.*Note: depending on how your key object (In this case String) implements hashcode() it may be possible to have duplicate keys We can do some cool things such as check to see if the map contains a certain key or value: myMap.containsKey(1); myMap.containsValue("Epicblood"); Both of these return the boolean `true`. We can iterate and loop through each key/value pair in the hashmap by doing this: for(Map.Entry pair : myMap.entrySet()){ System.out.println(pair.getValue() + " is awesome!"); } Remember that hashmaps are not ordered! They are sorted based on hashcode and are likely not even remotely in the order you place them in. Getting a Value stored at a Key is very simple; String myName = myMap.get(0); Note that 0 is not the index as it is with an array, it is the key! You can also get the size of a Hashmap by using the `size()` method. int mapSize = myMap.size(); If you want an ordered Hashmap (Hashmap that is in the order that you add ****), you will want to use a LinkedHashmap, it has all the same methods as a Hashmap, however is slightly slower. Now on to a TreeMap. A TreeMap is sorted by keys, and therefore whatever object you use as the key must implement the Comparable interface. Because of this, TreeMap cannot have duplicate Keys, and it is not ordered, however it's methods are the same as Hashmap and LinkedHashMap
  6. Hello everyone, i was wondering how can i resovle my following issue: i have a GUI JFrame named My_Frame, and it contains a jTextArea. I have another Class named DBConnect witch has a method that prints stuff out of my Database.That method is called getData().So, i want the output of getData() method to be the text of my TextArea.jTextArea1.setText(db.getData()); Won't work!Thanks for your time!My code for the class : My_Frame public void jtextArea1(String text) { System.out.print(text); jTextArea1.append(text); } public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new My_Frame().setVisible(true); DBConnect db=new DBConnect(); jTextArea1.setText(db.getData()); } });
  7. Hi all what JAVA use L2JACIS 315 ?
  8. Hey! So, Death posted a tutorial on how to download files from the Internet in C#, you can view that here. Now, I've decided to do a similar thing; however, I am going to cover how to perform this task in Java! import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; public class JavaFileDownloader { public static void main(String[] args) { try { JavaFileDownloader myDownloader = new JavaFileDownloader(); myDownloader.downloadFile("http://www.funchap.com/wp-content/uploads/2014/01/Cute-Cat-Animal-Pictures-Background-HD-Wallpaper.jpg", "C:\\Users\\user_name\\Documents"); } catch (IOException e) { e.printStackTrace(); } } /** * Method downloads file from URL to a given directory. * @param fileURL - file URL to download * @param destDirectory - where the file goes * @throws IOException */ private void downloadFile(String fileURL, String destDirectory) throws IOException { // File name that is being downloaded String downloadedFileName = fileURL.substring(fileURL.lastIndexOf("/") + 1); // Open connection to the file URL myURL = new URL(fileURL); InputStream myInputStream = myURL.openStream(); // Stream to the destination file FileOutputStream myOutputStream = new FileOutputStream(destDirectory + "/" + downloadedFileName); // Read bytes from URL to the local file byte[] myBuffer = new byte[65536]; int bytesRead = 0; System.out.print("Now downloading the following file: " + downloadedFileName); while ((bytesRead = myInputStream.read(myBuffer)) != -1) { System.out.print("."); // This is a progress bar. myOutputStream.write(myBuffer, 0, bytesRead); } System.out.println("Download... complete!"); // Close destination stream myOutputStream.close(); // Close URL stream myInputStream.close(); } } You need to replace the 'user_name' on line 11 with the name of your user account on your computer. You'll get a FileNotFoundException if you choose to not change that. I don't typically explain these; therefore, if there are any questions... let me know! Output:
  9. I just made this program real quick in Java because I needed it Basically it takes the itemids and displayids and generates a csv file that you can then convert with something like MyDBCEditor GUI isn't the greatest, but it gets the job done It is very straight forward and explains everything in the GUI. It only creates 1 class/faction at a time though (class - horde, class - alliance) so you will have to check "overwrite" for the first class, then append the rest of the classes. The output for one class is: long,byte,byte,byte,byte,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long,long, 898,1,10,0,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 142,3,10,0,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 142,4,10,0,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 650,7,10,0,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 183,11,10,0,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 898,1,10,1,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 142,3,10,1,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 142,4,10,1,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 650,7,10,1,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, 183,11,10,1,0,40816,40856,40778,46072,40836,40878,40887,40797,40679,42117,42116,42074,41584,40703,40701,42485,-1,-1,-1,-1,-1,-1,-1,55803,55805,55801,60346,55804,55650,55635,55802,35437,39129,39129,49738,40524,54471,54068,56177,-1,-1,-1,-1,-1,-1,-1,1,3,5,6,7,8,9,10,2,11,12,15,0,16,17,18,-1,-1,-1,-1,-1,-1, Please post here with any comments/suggestions/CC Download - Here Please let me know if anything is incorrect. I personally hardly use the DBC, and just used trinitycore's wiki and the default CSV to make this.
  10. I don't know about anyone else, but personally Java is the language I use for most everything I can. All my tools and such are coded in it, and I have taken an AP course to learn it. Would really like to see this as an available main language, or at least as an "other skill"

About us

MMO-Society is the Forum former known as Lordcraft, MMO-Society offers various of Resources to help you evolve your knowledge within Emulation, In the process we make sure to form a strong community bond in-between each other and thus we are proud to can admit that MMO-Society is possibly the friendliest Community Forum to currently exist.

Useful Quick-Links

  • Create New...