# Eclipse: Fehlermeldung nach dem Kompilieren



## deathlock (22. Sep 2005)

Hi Leute!

Ich bekomme nach dem Kompilieren immer folgende Fehlermeldung:
"Bootstrap: Couldn't find install directory"

Weiss jemand woran das liegen könnte?

Thx schonmal.

LG, deathlock.


----------



## Bleiglanz (22. Sep 2005)

java installation kaputt


----------



## deathlock (22. Sep 2005)

bist du sicher? das war doch nur mit diesem bestimmten SourceCode. Ansonsten funktionierts doch supa. Die Meldung krieg ich nur wenn ich diese bestimmte Klasse kompilieren will, ansonsten nie.


----------



## Bleiglanz (22. Sep 2005)

Welche Fehlermeldung genau? 

Welche IDE?

Welche Klasse?

Was heisst "nach dem Kompilieren"? Beim Ausführen? Geht das Kompilieren noch???


----------



## deathlock (22. Sep 2005)

Bleiglanz hat gesagt.:
			
		

> Welche Fehlermeldung genau?


Bootstrap: couldn't get install directory
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at javax.sound.sampled.AudioInputStream.<init>(Unknown Source)
	at AudioRecorder.<init>(AudioRecorder.java:15)
	at MainClass.actionPerformed(MainClass.java:88)
	at java.awt.Button.processActionEvent(Unknown Source)
	at java.awt.Button.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)



			
				Bleiglanz hat gesagt.:
			
		

> Welche IDE?


Eclipse, aber dasselbe passiert auch mit javac und java.



			
				Bleiglanz hat gesagt.:
			
		

> Welche Klasse?




```
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.sound.sampled.*;

public class MainClass extends Frame implements ActionListener
{
	static final long serialVersionUID = 0;
	 Label recording = new Label("Recording...");
		
	MainClass()
	{
		super();
		this.setTitle("NISSI v1.0");
		this.setLocation(1050, 450);
		this.setSize(150, 400);
		this.setBounds(1050, 450, 150, 400);
		Color bgclr = new Color(200,220,220);
		this.setBackground(bgclr);
		this.setLayout(null);
		Label lbTitle = new Label("NISSI v1.0");
		lbTitle.setBounds(40, 40, 100, 20);
		lbTitle.setForeground(Color.BLUE);
		Label lbIp = new Label("Type in IP-address:");
		lbIp.setForeground(Color.BLUE);
		lbIp.setBounds(10, 90, 120, 20);
		TextField tfIp = new TextField();
		tfIp.setBounds(10, 110, 120, 20);
		Button btConnect = new Button("Connect");
		btConnect.setBounds(5, 170, 70, 30);
		Button btDisconnect = new Button("Disconnect");
		btDisconnect.setBounds(75, 170, 70, 30);
		Button btStartRec = new Button("Talk");
		btStartRec.setBounds(5, 280, 70, 30);
		btStartRec.addActionListener(this);
		btStartRec.setActionCommand("startRec");
		Button btStopRec = new Button("Stop");
		btStopRec.setBounds(75, 280, 70, 30);
		btStopRec.addActionListener(this);
		btStopRec.setActionCommand("stopRec");
		Button btExit = new Button("EXIT");
		btExit.setBounds(75, 350, 70, 30);
		btExit.addActionListener(this);
		btExit.setActionCommand("exit");
		recording.setBounds(10, 300, 100, 30);
		
		this.add(lbTitle);
		this.add(lbIp);
		this.add(tfIp);
		this.add(btConnect);
		this.add(btDisconnect);
		this.add(btStartRec);
		this.add(btStopRec);
		this.add(btExit);
		
		this.addWindowListener(new WindowAdapter()
				{
					public void windowClosing(WindowEvent e)
					{
						setVisible(false);
						dispose();
						System.exit(0);
					}
				});
				
		this.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent ae)
	{
		String actionCommand = ae.getActionCommand();
		
		if(actionCommand.equals("exit"))
		{
			this.setVisible(false);
			this.dispose();
			System.exit(0);
		}
				
		if(actionCommand.equals("startRec"))
		{
			File outputFile = new File("test.wav");
			AudioFormat	audioFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 44100.0F, 16, 2, 4, 44100.0F, false);
			DataLine.Info	info = new DataLine.Info(TargetDataLine.class, audioFormat);
			TargetDataLine	targetDataLine = null;
			
			AudioFileFormat.Type targetType = AudioFileFormat.Type.WAVE;
			AudioRecorder recorder = new AudioRecorder(targetDataLine, targetType, outputFile);
			
			try
			{
				targetDataLine = (TargetDataLine) AudioSystem.getLine(info);
				targetDataLine.open(audioFormat);
			}
			catch(LineUnavailableException e)
			{
				System.out.println("LineUnavailable");
			}
			recorder.startRecording();
			this.add(recording);
		}
		 if(actionCommand.equals("stopRec"))
		{
			 //recorder.stopRecording();
			this.remove(recording);
		}
	}
	
	public static void main(String[] args) 
	{
		MainClass mc = new MainClass();		
	}

}
```


```
import javax.sound.sampled.*;
import java.io.*;

class AudioRecorder extends Thread
{
	private TargetDataLine m_line;
	private AudioFileFormat.Type m_targetType;
	private File m_outputFile;
	private AudioInputStream m_audioInputStream;
	
	public AudioRecorder(TargetDataLine line, AudioFileFormat.Type targetType, File file)
	{
		m_line = line;
		m_targetType = targetType;
		m_audioInputStream = new AudioInputStream(line);
		m_outputFile = file;		
	}
	
	public void startRecording()
	{
		m_line.start();
		super.start();
	}
	
	public void stopRecording()
	{
		m_line.stop();
		m_line.close();
	}
	
	public void run()
	{
		try
		{
			AudioSystem.write(m_audioInputStream, m_targetType, m_outputFile);
		}
		catch(IOException e)
		{
			System.exit(1);
		}
	}
}
```



			
				Bleiglanz hat gesagt.:
			
		

> Was heisst "nach dem Kompilieren"? Beim Ausführen? Geht das Kompilieren noch???


Kompilieren geht, der Fehler kommt immer beim Ausführen.
Exceptions kommen immer, nach dem Drücken auf den Button "Talk".[/code]


----------

