#1
29.01.2011, 08:18
 Zordon JD Alpha Join Date: Jun 2010 Posts: 21

Hi,
I used to be able to compile JD on my old OS after spending days on nearly the same problem.... :(

I can run jd.Main in eclipse without problems.
The build.xml file compiles without problems. However, when I run it with "java -jar downloader.jar" I get the following error:
Code:
```>java -jar jdownloader.jar

Exception in thread "main" java.lang.NoClassDefFoundError: jd/nutils/encoding/En
coding
at jd.nutils.Formatter.filterInt(Formatter.java:144)
at jd.utils.JDUtilities.getJavaVersion(JDUtilities.java:239)
at jd.Main.javaCheck(Main.java:139)
at jd.Main.preInitChecks(Main.java:405)
at jd.Main.main(Main.java:273)
Caused by: java.lang.ClassNotFoundException: jd.nutils.encoding.Encoding
at java.security.AccessController.doPrivileged(Native Method)
... 5 more```
The manifest.mf looks like this:
Code:
```Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: JD-Team and AppWork UG
Main-Class: jd.Main
Class-Path: libs/BrowserLauncher2.jar libs/Filters.jar libs/JAntiCaptc
ha.jar libs/JDGUI.jar libs/JDHttp.jar libs/JDUtils.jar libs/appworkut
jar libs/dbus/hexdump.jar libs/dbus/libdbus-java.jar libs/dbus/unix.j
ar libs/flex-messaging-common.jar libs/flex-messaging-core.jar libs/h
sqldb.jar libs/htmlcleaner2_0.jar libs/image4j.jar libs/irclib.jar li
bs/jackson-core.jar libs/jackson-mapper.jar libs/jetty-io-7.1.6.v2010
0715.jar libs/jetty-security-7.1.6.v20100715.jar libs/jetty-server-7.
1.6.v20100715.jar libs/jetty-servlet-7.1.6.v20100715.jar libs/jetty-u
til-7.1.6.v20100715.jar libs/jna.jar libs/jpfm-fs.jar libs/jpfm.jar l
ibs/js.jar libs/laf/substance-swingx.jar libs/laf/substance.jar libs/
laf/synthetica.jar libs/laf/syntheticaBatik.jar libs/laf/syntheticaBl
ackEye.jar libs/laf/syntheticaBlackMoon.jar libs/laf/syntheticaBlackS
tar.jar libs/laf/syntheticaBlueIce.jar libs/laf/syntheticaBlueMoon.ja
r libs/laf/syntheticaBlueSteel.jar libs/laf/syntheticaGreenDream.jar
libs/laf/syntheticaMauveMetallic.jar libs/laf/syntheticaOrangeMetalli
c.jar libs/laf/syntheticaSilverMoon.jar libs/laf/syntheticaSimple2D.j
jar libs/laf/trident.jar libs/miglayout.jar libs/savemytube.jar libs/
sevenzipjbinding-AllPlatforms.jar libs/sevenzipjbinding.jar libs/svnk
it.jar libs/swingworker.jar libs/swingx.jar plugins/Customizer.jar pl
ugins/JDScheduler.jar```
I run jdownloader in a folder with all the libs mentioned here. So why does it crash on every startup within it's main function? (it stops on line 139 of the current sources on the call of JDUtilities.getJavaVersion() - tested it by adding log lines)
When I try to run jdupdate.jar (also self compiled) it just says: Could not find th main class: jd.update.Main. Programm will exit.

So I guess again a "simple" class path problem which is affecting both jars??

Thanks.

Attached Files

Last edited by Jiaz; 31.01.2011 at 11:04.
#2
29.01.2011, 10:40
 Jiaz JD Manager Join Date: Mar 2009 Location: Germany Posts: 66,134

i would say that your generated folder structutre is not complete or you are missing the libs folder the jar alone is not runnable
__________________
#3
29.01.2011, 17:39
 Zordon JD Alpha Join Date: Jun 2010 Posts: 21

Thank you so much for your help. Desperately tried to compile it all night...

But then it would run within and official JD folder (where I can execute your binary)?
Since it doesn't, there has to be something else wrong?
Do I have to configure anything on the build.xml file? See the screenshot for my settings (just the ones from svn).

edit. does the ant script need some system environment variables? (but then it wouldn't compile at all?) here the build log:
Spoiler:
Code:
```Buildfile: D:\Dokumente\Programmierung\Java\JDownloader\build\build.xml
clean:
copy_res:
compile:
[echo] Finished.
jarMain:
jarWebupdater:
jarReconnectOptionals:
[echo] Creating batch
jarRestarter:
copy_compiled:
jarOptionals:
[echo] Creating JDChat
[echo] Creating JDwebinterface
[echo] Creating infobar
[echo] Creating lecturnity
[echo] Creating JDRemoteControl
[echo] Creating JDScheduler
[echo] Creating JDShutdown
[echo] Creating improveddock
[echo] Creating JDLangFileEditor
[echo] Creating JDInfoFileWriter
[echo] Creating JDUnrar
[echo] Creating JDHJMerge
[echo] Creating JDTray
[echo] Creating ExternInterface
[echo] Creating JDGrowl
[echo] Creating Customizer
[echo] Creating AntiShutdown
[echo] Creating RouterDBEditor
[echo] Creating scriptlauncher
[echo] Creating JDFeedMe
[echo] Creating AntiReconnect
[echo] Creating Extraction
[echo] Creating folderwatch
copy_jarOptionals:
build_all:
[echo] Finished.
pack_multios:
BUILD SUCCESSFUL
Total time: 12 seconds```
Attached Images
 Classpath.jpg (96.1 KB, 285 views)

Last edited by Zordon; 29.01.2011 at 17:48.
#4
29.01.2011, 22:23
 Zordon JD Alpha Join Date: Jun 2010 Posts: 21

I fixed it by copying (missing?) sources from JDBrowser to JDownloader project.
But now all addons are missing (even though they are in the directory with the jar or its subdirectories).
Any idea?
Attached Images
#5
29.01.2011, 23:00
 Zordon JD Alpha Join Date: Jun 2010 Posts: 21

And why did I have to copy something??
I have these project folders all in the same directory (and in eclipse):
JDBrowser
JDUpdater
AppWorkUtils

Shouldn't it automatically get the needed classes from JDBrowser, when I run build.xml?
#6
31.01.2011, 11:03
 Jiaz JD Manager Join Date: Mar 2009 Location: Germany Posts: 66,134

i guess the buld script needs to get updated.
__________________
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8598842620849609, "perplexity": 12816.823880541104}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-10/segments/1581875145747.6/warc/CC-MAIN-20200223062700-20200223092700-00107.warc.gz"}