Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 18:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Problem mit java

Discussion on Problem mit java within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
Yoshimore's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 478
Received Thanks: 90
Problem mit java

Hi Leute,

hab mal bisschen mit Java rumprobiert und eine leichte Console geschrieben die nach Command Programme startet. Nun hab ich das Problem, dass wenn ich z.b. durch den Command Minecraft starte, bekomme ich auf Multiplayer Servern laggs geschweige denn Time-Outs. Woran kann das liegen? Außerdem hab ich die Datei in eine JAR Datei expotiert und dann mit exe4j zu einer exe Console compiliert. Liegt es vielleicht daran? Diese Problem ist außerdem nur bei anderen Java Applikationen wie gesagt z.b. Minecraft.

PHP Code:
package org.sleeyz.console;
import java.io.IOException;
import java.util.Scanner;

public class 
Konsole {
    public static 
void main(String[] argsthrows IOException{
        final 
Scanner sc = new Scanner(System.in);
        
        while (
true) {
            
String input sc.nextLine();
            
String[] arrayInput input.split(" ");
            
String command arrayInput[0];
            
            if (
input.equalsIgnoreCase("exit")) {
                
System.exit(0);
            } else if (
command.equalsIgnoreCase("startwow")) {
                    
Runtime.getRuntime().exec("D:/World of Warcraft Frostmourne/World of Warcraft/Wow.exe");
                    
System.out.println("World of Warcraft is getting started! It could take a moment to load!");
            } 
            else if (
command.equalsIgnoreCase("startlolpbe")) {
                
Runtime.getRuntime().exec("C:/Users/Florian/Desktop/LOLPBE.lol.laucher.admin.exe");
                
System.out.println("League of Legends PBE Server is getting started! It could take a moment to load!");
            }
            else if (
command.equalsIgnoreCase("startloleuw")) {
                
Runtime.getRuntime().exec("D:/Riot/League of Legends.lol.laucher.admin.exe");
                
System.out.println("League of Legends EUW Server is getting started! It could take a moment to load!");
            }
            else if (
command.equalsIgnoreCase("startminecraft")) {
                
Runtime.getRuntime().exec("C:/Users/Florian/AppData/Roaming/.minecraft/Minecraft.exe");
                
System.out.println("Minecraft is getting started! It could take a moment to load!");
            }
            else if (
command.equalsIgnoreCase("editminecraft")) {
                
Runtime.getRuntime().exec("explorer.exe C:/Users/Florian/AppData/Roaming/.minecraft");
                
System.out.println("Minecraft's folder got open! Be careful what you do there!");
            }
            else if (
command.equalsIgnoreCase("feedthebeast")) {
                
Runtime.getRuntime().exec("C:/Users/Florian/Downloads/FTB_Launcher.exe");
                
System.out.println("Feed the Beast is getting started! It could take a moment to load!");
            }
            else if (
command.equalsIgnoreCase("chrome")) {
                
Runtime.getRuntime().exec("C:/Users/Florian/AppData/Local/Google/Chrome/Application/chrome.exe");
                
System.out.println("Google Chrome is getting started! It could take a moment to load!");
            }
            else if (
command.equalsIgnoreCase("skype")) {
                
Runtime.getRuntime().exec("C:/Program Files (x86)/Skype/Phone/Skype.exe");
                
System.out.println("Skype is getting started! It could take a moment to load!");
            }
            else if (
command.equalsIgnoreCase("raidcall")) {
                
Runtime.getRuntime().exec("C:/Program Files (x86)/RaidCall/Raidcall.exe");
                
System.out.println("Raidcall is getting started! It could take a moment to load!");
            }
            else if (
command.equalsIgnoreCase("help")) {
                
System.out.println("Avaible Commands are: startwow, startlolpbe, startloleuw, startminecraft, editminecraft, feedthebeast, help, chrome, skype, raidcall, about");
            }
            else if (
command.equalsIgnoreCase("about")) {
                
System.out.println("Console coded by: Florian ****** , 2013. All rights reserved!");
            }
            else if (
command.equalsIgnoreCase("say")) {
                if (
arrayInput.length 1) {
                    for (
int i 1arrayInput.lengthi++) {
                        
System.out.print(arrayInput[i] + " ");
                    }
                    
System.out.println();
                } 
                else {
                    
System.err.println("Error: 'say' needs atleast one or more arguments!");
                    
                }
                

            }            
            else {
                
System.err.println("Error: Command not found!");
            }
        }
    }

lg
Yoshimore is offline  
Old 04/09/2013, 18:16   #2
 
elite*gold: 35
Join Date: Apr 2011
Posts: 800
Received Thanks: 214
Das kann ich dir leider nicht sagen. Versuch mal das Programm zu beenden bis das gestartete selbst beendet wurde, Das würde zwar heißen das du nur eines starten kannst, jedoch hilft es vielleicht. . .
.AppleTree. is offline  
Reply


Similar Threads Similar Threads
Java problem
03/09/2013 - Technical Support - 5 Replies
hey, da ich ein problem mit minecraft hab, hab ich einfach mal java neuinstalliert. allerdings bekomme ich diese fehlermeldung: http://i.epvpimg.com/rkZEf.png würd mich freun wenn ihr mir helfen könntet. bis auf minecraft funktioniert alles problemlos. kenn mich da aber nicht aus, daher würd ich mich intressieren was passieren kann wenn ich jave nicht aktuell / fehlerhaft installiert hab.
Java Problem
08/31/2012 - Technical Support - 2 Replies
Hey Zusammen Seit einer Weile hab ich das Problem, das kein Browser Java erkennt, anderst kann ich mir die folgenden Meldungen nicht erklären: http://s7.directupload.net/images/120831/temp/xd3 tctmm.png http://s1.directupload.net/images/120831/temp/xtk m6lsa.jpg Ich habe Windows 7 mit einem 64Bit System, als Browser benutze ich FireFox. Da Minecraft funktionert, muss Java also richtig installiert sein...-.-'
Java Problem
01/08/2012 - Minecraft - 5 Replies
Hallo Ich hab ein Problem mit Java. Welches java soll ich nehmen? Wollt ja ein Server machen, hab ein Java installiert da war im Java Ordner kein bin Ordner. Deshalb wollte ich fragen kann mir jemand sagen welches ich nehmen soll? Habe 64 Bit wäre nice wenn ihr mir auch gleich Link schicken könnt. MFG Black
Java problem
11/02/2011 - Technical Support - 5 Replies
Guten Abend allerseits, ich habe follgendes problem und zwar seit ein paar Tagen funktioniert Java nichtmehr so richtig. Am anfang hab ich das gemerkt, da ich Minecraft nichtmehr starten konnte ... jetzt hab ich auf Java.com nachgeschaut hab getestet ob es richtig Installiet wurde und schon beim laden der Testseite hat sich Firefox aufgehängt und musste beendet werden. Hab Java deinstalliert, Pc neugestartet, Java wieder runtergeladen (Java 6 Update 29), geht immer noch nicht... YouTube...
java problem mit ||
10/28/2010 - General Coding - 2 Replies
hab nen problem mit dem "oder"-zeichen in der if abfrage... beim starten bekomm ichden fehler: operator || cannot be applied to boolean,int die lösung ich glaube ich so einfach, dass es schon fast schwer ist es zu sehen.. :D hier ein bsp.



All times are GMT +2. The time now is 18:10.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.