Fehler beim start von Eclipse?

1 Antwort

Wie funktioniert bzw. die Spracheingabe bei Java?

Ich bin neu in Java und hatte mich durch die Tutorials geschaut und habe habe ein kleines Programm geschrieben. Ich habe viele Probleme z.B. das Hintergrundbild zeigt nicht an, die JMenubar kann ich nirgends was auf der Seite etwas ausführen. Und bin noch Anfänger.

Mein Vorhaben ist:

Das man bei der Jmenubar was anklickt ohne das ein neues Fenster angezeigt werden soll. es soll einfach z.B da ein Text stehen und funktionen erhalten. Das Fenster soll ein Sprach input haben, Wo man in der Einstellung am Regler waagerecht die Lautstärke der Aufnahme steuern kann. Die Wörter in umwandelt, wo es weißt, was zu tun ist. (Wie ein Diktat z.B). Bei weiteren Fragen stehe ich euch gern zur verfügung. Es ist mein erstes großes Projekt. Wenn ihr wollt könnt ihr euch darin verewigen. Die Main Klasse und die Gui schreibe ich in den kommi, sonst zu lang der Text.

Ich habe Die Klassen:

  • Main
  • Gui
  • var
  • Label

Die var Klasse:

package pack;

import java.awt.Label; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException;

import javax.imageio.ImageIO; import javax.swing.JFrame;

public class var {

static JFrame jf1;
static int sreenwidth = 800, sreenheight = 500;
static int background = 0;


static Label lbl1;

static BufferedImage ib1;

public var() {
    
    try {
        //Background
        
        ib1 = ImageIO.read(new File("src/rsc/kl.png"));
    }catch (IOException e) {
        e.printStackTrace();
        System.out.println("Bilder konnte nicht geladen werden");
    }
}

}

Im Label Klasse:

package pack;

import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints;

import javax.swing.JLabel;

public class label extends JLabel{ private static final long serialVersionUID =1L;

protected void paintComponent(Graphics g) {
    super.paintComponent(g);

    Graphics2D g2d = (Graphics2D) g;

    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    
    g.drawImage(var.ib1, 0,var.background, 800,500, null);
    
    repaint();
}

...zur Frage

Hallo ich habe ein Minecraft-bukkit-plugin Programmiert in Eclipse bekomme ich keine fehler aber in der Konsole (Das Plagin ist ein InvetarKitsPlugin) Error:?

[15:50:14 ERROR]: Could not pass event InventoryCreativeEvent to ItemsKit v1.0 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:302) ~[bukkit.jar:git-Bukkit-18fbb24] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) ~[bukkit.jar:git-Bukkit-18fbb24] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:501) [bukkit.jar:git-Bukkit-18fbb24] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:486) [bukkit.jar:git-Bukkit-18fbb24] at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java :1710) [bukkit.jar:git-Bukkit-18fbb24] at net.minecraft.server.v1_8_R3.PacketPlayInSetCreativeSlot.a(SourceFile :23) [bukkit.jar:git-Bukkit-18fbb24] at net.minecraft.server.v1_8_R3.PacketPlayInSetCreativeSlot.a(SourceFile :9) [bukkit.jar:git-Bukkit-18fbb24] at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:1 3) [bukkit.jar:git-Bukkit-18fbb24] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [ ?:1.8.0_71] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_71] at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [bukkit.jar :git-Bukkit-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:6 73) [bukkit.jar:git-Bukkit-18fbb24] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:3 35) [bukkit.jar:git-Bukkit-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:6 29) [bukkit.jar:git-Bukkit-18fbb24] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java :537) [bukkit.jar:git-Bukkit-18fbb24] at java.lang.Thread.run(Unknown Source) [?:1.8.0_71] Caused by: java.lang.IllegalArgumentException: Specified enchantment cannot be a pplied to this itemstack at org.bukkit.inventory.ItemStack.addEnchantment(ItemStack.java:440) ~[b ukkit.jar:git-Bukkit-18fbb24] at Kits.Kits.Inventory(Kits.java:31) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0 _71] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0 _71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .8.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:300) ~[bukkit.jar:git-Bukkit-18fbb24] ... 15 more [15:50:15 ERROR]: Could not pass event InventoryCreativeEvent to ItemsKit v1.0 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:302) ~[bukkit.jar:git-Bukkit-18fbb24] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) ~[bukkit.jar:git-Bukkit-18fbb24] at org.bukkit.plugin.Si

...zur Frage

Minecraft-server: Was läuft schief?

Der Log:

[09:00:55] [Server thread/INFO]: Starting minecraft server version 1.8.1
[09:00:55] [Server thread/INFO]: Loading properties
[09:00:55] [Server console handler/ERROR]: Exception handling console input
java.io.IOException: Das Handle ist ungültig
    at java.io.FileInputStream.readBytes(Native Method) ~[?:1.7.0_71]
    at java.io.FileInputStream.read(Unknown Source) ~[?:1.7.0_71]
    at java.io.BufferedInputStream.read1(Unknown Source) ~[?:1.7.0_71]
    at java.io.BufferedInputStream.read(Unknown Source) ~[?:1.7.0_71]
    at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) ~[?:1.7.0_71]
    at sun.nio.cs.StreamDecoder.implRead(Unknown Source) ~[?:1.7.0_71]
    at sun.nio.cs.StreamDecoder.read(Unknown Source) ~[?:1.7.0_71]
    at java.io.InputStreamReader.read(Unknown Source) ~[?:1.7.0_71]
    at java.io.BufferedReader.fill(Unknown Source) ~[?:1.7.0_71]
    at java.io.BufferedReader.readLine(Unknown Source) ~[?:1.7.0_71]
    at java.io.BufferedReader.readLine(Unknown Source) ~[?:1.7.0_71]
    at pr.run(SourceFile:81) [minecraft_server.1.8.1.exe:?]
[09:00:55] [Server thread/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
[09:00:55] [Server thread/INFO]: Stopping server
[09:00:55] [Server Shutdown Thread/INFO]: Stopping server

Ich verstehe nicht, wie ich diese Fehler behebe. Kann mir jemand helfen?

...zur Frage

eclipse (neon und kepler) startet nicht - logfile?

LOGFILE ECLIPSE KEPLER

!SESSION 2018-03-09 12:01:30.237 -----------------------------------------------

eclipse.buildId=4.3.2.M20140221-1700

java.version=9.0.4

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE

Framework arguments: -product org.eclipse.epp.package.jee.product

Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.osgi 4 0 2018-03-09 12:01:30.749

!MESSAGE Startup error

!STACK 1

java.lang.RuntimeException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle org.eclipse.osgi.

at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:233)

at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:656)

at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:275)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)

at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle org.eclipse.osgi.

at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)

at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)

at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:225)

... 11 more

Caused by: java.lang.IllegalStateException: The System Bundle could not be resolved: Missing Constraint: Bundle-RequiredExecutionEnvironment: J2SE-1.5

at org.eclipse.osgi.internal.baseadaptor.BaseStorage.checkSystemState(BaseStorage.java:827)

at org.eclipse.osgi.internal.baseadaptor.BaseStorage.getStateManager(BaseStorage.java:800)

at org.eclipse.osgi.baseadaptor.BaseAdaptor.getState(BaseAdaptor.java:387)

at org.eclipse.osgi.internal.baseadaptor.BaseStorage.frameworkStart(BaseStorage.java:923)

at org.eclipse.osgi.baseadaptor.BaseAdaptor.frameworkStart(BaseAdaptor.java:250)

at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:60)

at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)

at java.base/java.security.AccessController.doPrivileged(Native Method)

at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)

... 13 more

...zur Frage

Optifine funktioniert seit Update nicht mehr?

hi seit dem letztem Update funktioniert mein Optifine nicht mehr ich bekomme im Launcher immer so eine komische Nachricht. Optfine deinstalliert und nochmal neu heruntergeladen. Jetzt ist das Problem immer wenn ich auf Installieren klicke, bekomme ich eine Java Errornachricht diese sieht wie folgt aus... ich hoffe mir kann jemand helfen. Danke Error: java.io.FileNotFoundException: C:\Users\Tim\AppData\Roaming.minecraft\versions\1.8.9\1.8.9.json (Das System kann die angegebene Datei nicht finden) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(Unknown Source) at java.io.FileInputStream.(Unknown Source) at optifine.Utils.copyFile(Utils.java:215) at optifine.Installer.copyMinecraftVersion(Installer.java:385) at optifine.Installer.doInstall(Installer.java:94) at optifine.InstallerFrame.onInstall(InstallerFrame.java:422) at optifine.InstallerFrame.connEtoC1(InstallerFrame.java:487) at optifine.InstallerFrame.access$7(InstallerFrame.java:481) at optifine.InstallerFrame$IvjEventHandler.actionPerformed(InstallerFrame.java:46) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) a

...zur Frage

Was möchtest Du wissen?