User Käyttäjä Salasana  
   
tiistai 10.6.2025 / 08:55
Hae keskustelualueilta:        In English   Suomeksi   På svenska
afterdawn.com > keskustelu > yleistä keskustelua tietokoneista > windows -ongelmat > java ohjelman käynnistys
Näytä aiheet
 
Keskustelualueet
Keskustelualueet
Java ohjelman käynnistys
  Siirry:
 
Kirjoittaja Viesti
teplun1
Junior Member

1 tuotearvio
_
21. helmikuuta 2011 @ 13:32 _ Linkki tähän viestiin    Lähetä käyttäjälle yksityisviesti   
Yritän käynnistää Win7:lla .jar ohjelmaa kaksoisklikkauksella. Tulee tällainen ilmoitus:
D:\Downloads>bdsup2sub.jar
Exception in thread "main" java.lang.NoClassDefFoundError: D:\Downloads\BDSup2Sub/jar
Caused by: java.lang.ClassNotFoundException: D:\Downloads\BDSup2Sub.jar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: D:\Downloads\BDSup2Sub.jar. Program will
exit.
Ohjelma käynnistyy hyvin komentoriviltä komennolla "java -jar bdsup2sub.jar".
Koneessa on Win7 x64 ja asennettuna on sekä 64- että 32-bittinen Java RE.
Missä on vika?
tukis
Suspended due to non-functional email address
_
21. helmikuuta 2011 @ 15:59 _ Linkki tähän viestiin    Lähetä käyttäjälle yksityisviesti   
Lainaus:
Sounds like you are hitting a problem with javaw.exe or have more than one
version of the java virtual machine installed and the wrong one is getting
used when double-clicking

First, make sure you only have 1 version of the j2sdk/jre installed. I
installed the j2sdk 1.3 for a work-related project and then installed the
j2sdk 1.4 for a class I taught. Turns out that even though my "java plug
in" was set to the j2sdk1.4, the windows registry mapped the jarfile to be
opened with the 1.3 j2sdk. This caused jar files to hang when I
double-clicked them.

If you are comfortable with the windows registry and using regedit.exe check
these two locations:
HKEY_CLASSES_ROOT\jarfile\shell\open\command
make sure the path for javaw.exe is correct

Also check under:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr ent Version\App Paths
There may or may not be a folder for java.exe and javaw.exe here, but if
there is make sure the path is to the correct executable.

Another possibility is that some people experience problems with javaw.exe,
which is supposed to be just like java.exe execept that it does not pop open
a command prompt window. To double-check that its really this kind of
issue, click the Windows Start button, then click Run and type in the
command line (for example, java -jar c:\stuff\blah.jar) to run your "jar
program". Then try it with: javaw -jar c:\stuff\blah.jar
If it hangs with javaw and not java, then you can change the Windows
registry for the HKEY_CLASSES_ROOT\jarfile\shell\open\command to use
java.exe instead of javaw.exe

http://www.velocityreviews.com/forums/t130066-jar-launches-from-command-prompt-but-hangs-on-double-click.html

Viestiä on muokattu lähettämisen jälkeen. Viimeisin muokkaus 21. helmikuuta 2011 @ 16:00

teplun1
Junior Member

1 tuotearvio
_
21. helmikuuta 2011 @ 18:53 _ Linkki tähän viestiin    Lähetä käyttäjälle yksityisviesti   
Lainaus, alkuperäisen viestin kirjoitti tukis:
Lainaus:
Sounds like you are hitting a problem with javaw.exe or have more than one
version of the java virtual machine installed and the wrong one is getting
used when double-clicking

First, make sure you only have 1 version of the j2sdk/jre installed. I
installed the j2sdk 1.3 for a work-related project and then installed the
j2sdk 1.4 for a class I taught. Turns out that even though my "java plug
in" was set to the j2sdk1.4, the windows registry mapped the jarfile to be
opened with the 1.3 j2sdk. This caused jar files to hang when I
double-clicked them.

If you are comfortable with the windows registry and using regedit.exe check
these two locations:
HKEY_CLASSES_ROOT\jarfile\shell\open\command
make sure the path for javaw.exe is correct

Also check under:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr ent Version\App Paths
There may or may not be a folder for java.exe and javaw.exe here, but if
there is make sure the path is to the correct executable.

Another possibility is that some people experience problems with javaw.exe,
which is supposed to be just like java.exe execept that it does not pop open
a command prompt window. To double-check that its really this kind of
issue, click the Windows Start button, then click Run and type in the
command line (for example, java -jar c:\stuff\blah.jar) to run your "jar
program". Then try it with: javaw -jar c:\stuff\blah.jar
If it hangs with javaw and not java, then you can change the Windows
registry for the HKEY_CLASSES_ROOT\jarfile\shell\open\command to use
java.exe instead of javaw.exe

http://www.velocityreviews.com/forums/t130066-jar-launches-from-command-prompt-but-hangs-on-double-click.html

Nyt rupesi toimimaan. Poistin 64-bittisen Javan ja samoin todellisen kiusankappaleen eli Ovi Suiten, joka yritti väkisin ottaa haltuunsa .jar tiedoston.
afterdawn.com > keskustelu > yleistä keskustelua tietokoneista > windows -ongelmat > java ohjelman käynnistys
 

Apua ongelmiin: AfterDawnin keskustelualueet | AfterDawnin Vastaukset
Uutiset: IT-alan uutiset | Uutisia puhelimista
Musiikkia: MP3Lizard.com
Tuotearviot: Laitevertailu | Vertaa puhelimia | Vertaa kännykkäliittymiä
Pelit: Pelitiedostot, pelidemot ja trailerit
Ohjelmat: download.fi | AfterDawnin ohjelma-alueet
International: AfterDawn in English | Software downloads | Free, legal MP3s | AfterDawn på svenska
RSS -syötteet: AfterDawnin uutiset | Uusimmat ohjelmapäivitykset | Keskustelualueiden viestit
Tietoja: Tietoa AfterDawn Oy:stä | Mainosta sivuillamme | Sivuston käyttöehdot ja tietoja yksityisyydensuojasta
Ota yhteyttä: Lähetä palautetta | Ota yhteyttä mainosmyyntiimme
 
  © 1999-2025 AfterDawn Oy