This program is supposed to inform me using a wav file that Im currently in a specific keyboard input. So if I type in HEBREW for instance, it will launch the wav and inform me. If I use any other language, it will not do anything.So, when I run the following code in eclipse, it works great. It loads the resource and it does what its supposed to do in the KeyListener.But when I compile it to a runnable JAR and then run it, it simply wont load the wav. I have tried using JOptionPane to show a message dialog to check if it actually works, and it does work. If a letter is within the String[] I declared, it will inform me of that. So the KeyListener does work. BTW, I'm using JNativeHook to have a working global listener.I tried a few other methods to load the resource but I gather this way is the right way...Here is the code. Maybe someone here can help my find the problem? Thank you!p.sI can add the wav file itself but I guess any WAV file is applicable for this test...\[code\]package lang.detector;import java.awt.EventQueue;public class LangDetector implements NativeKeyListener{private JFrame frame;private Clip clip;private String[] letters;private AudioInputStream inputStream;public LangDetector() { initialize();}private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 300, 80); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); frame.setTitle("Language Detector V0.7"); frame.setResizable(false); JLabel lblLangoyo = new JLabel("LangoYO!"); lblLangoyo.setBounds(115, 18, 68, 14); frame.getContentPane().add(lblLangoyo); try { clip = AudioSystem.getClip(); inputStream = AudioSystem.getAudioInputStream(LangDetector.class.getResourceAsStream("/hebrew.wav")); clip.open(inputStream); } catch (Exception e) { e.printStackTrace(); } letters = new String[]{"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?"};}@Overridepublic void nativeKeyPressed(NativeKeyEvent e) {}@Overridepublic void nativeKeyReleased(NativeKeyEvent e) {}@Overridepublic void nativeKeyTyped(NativeKeyEvent e) { if (Arrays.asList(letters).contains(String.valueOf(e.getKeyChar()))){ System.out.println("its there"); clip.setMicrosecondPosition(0); clip.start(); }else{ System.out.println("its NOT there"); }}public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { GlobalScreen.registerNativeHook(); LangDetector window = new LangDetector(); window.frame.setVisible(true); GlobalScreen.getInstance().addNativeKeyListener(window); } catch (Exception e) { e.printStackTrace(); } } });}\[/code\]}