1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl
#---------------------------------
$experimentName = "BaselineSnow";
#$bestActivationThreshold = "0.9";
#---------------------------------
$resultDir = "/Users/System/Verfahren";
$experimentDir = "$resultDir/$experimentName";
$classifierOutFile = "$experimentDir/out.classifier";
$detectorOutFile = "$experimentDir/out.detector";
$evaluatorOutFile = "$experimentDir/out.evaluator";
$recallPrecisionFile = "$experimentDir/recall-precision";
$rocFile = "$experimentDir/roc";
system "nohup java -Xms128m -Xmx512m BaselineSnowClassifier $experimentName > $classifierOutFile";
1
2
3
4
5
6
7
8
Exception in thread "main" java.lang.NoClassDefFoundError: BaselineSnowClassifier
Caused by: java.lang.ClassNotFoundException: BaselineSnowClassifier
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Guest Clodan[...]
Code (perl): (dl )system "nohup java -Xms128m -Xmx512m BaselineSnowClassifier $experimentName > $classifierOutFile";
Mein Problem ist nun, dass er meine Java-Klasse BaselineSnowClassifier.java nicht findet. Ich bekomme die folgende Fehlermeldung zurück:
Code: (dl )Exception in thread "main" java.lang.NoClassDefFoundError: BaselineSnowClassifier
[...]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/perl use 5.012; use warnings; use FindBin; use File::Spec qw(catdir catfile); sub quoteshell { my ($_) = @_; s/'/'\\''/g; return "'$_'"; } my $resultDir = '/Users/System/Verfahren'; my $experimentName = 'BaselineSnow'; my $classpath = $FindBin::RealBin; my $experimentDir = catdir($resultDir, $experimentName); my $classifierOutFile = catfile($experimentDir, 'out.classifier'); $classpath = quoteshell($classpath); $experimentName = quoteshell($experimentName); $classifierOutFile = quoteshell($classifierOutFile); system "nohup java -Xms128m -Xmx512m -classpath $classpath BaselineSnowClassifier $experimentName > $classifierOutFile";