2010-12-08 16 views
0

私はnetbeansに2つのプロジェクトがあります.1つはj2meアプリケーションで、もう1つはscalaアプリケーションです。 j2meアプリケーションのリソースとしてscalaアプリケーションのコンパイル済みのjarを含めました。netbeans javaモバイルアプリケーションとscalaアプリケーション

これが結果です:

Created dir: C:\Users\Para\Documents\NetBeansProjects\Barbut\build\compiled 
Expanding: C:\Users\Para\Documents\NetBeansProjects\ScalaLogic\dist\ScalaLogic.jar into C:\Users\Para\Documents\NetBeansProjects\Barbut\build\compiled 
do-compile: 
Compiling 1 source file to C:\Users\Para\Documents\NetBeansProjects\Barbut\build\compiled 
C:\Users\Para\Documents\NetBeansProjects\Barbut\build\compiled\MainLogic\Test.class: warning: Cannot find annotation method 'bytes()' in type 'scala.reflect.ScalaSignature': class file for scala.reflect.ScalaSignature not found 
1 warning 
post-compile: 
compile: 
pre-obfuscate: 
proguard-init: 
skip-obfuscation: 
proguard: 
post-obfuscate: 
obfuscate: 
lwuit-build: 
pre-preverify: 
do-preverify: 
Created dir: C:\Users\Para\Documents\NetBeansProjects\Barbut\build\preverifysrc 
Copying 2 files to C:\Users\Para\Documents\NetBeansProjects\Barbut\build\preverifysrc 
Created dir: C:\Users\Para\Documents\NetBeansProjects\Barbut\build\preverified 
Preverifying 2 file(s) into C:\Users\Para\Documents\NetBeansProjects\Barbut\build\preverified directory. 
Error preverifying class MainLogic.Test 
    java/lang/NoClassDefFoundError: scala/ScalaObject 
C:\Users\Para\Documents\NetBeansProjects\Barbut\nbproject\build-impl.xml:472: Preverification failed with error code 1. 
BUILD FAILED (total time: 9 seconds) 

誰が間違って何が起こっているか任意のアイデアを持っていますか?ありがとう

+0

どのようにリソースに追加しましたか?コンパイラによるとクラスパスにはありません。 –

答えて

0

@thoredge 私はそれをしようと試みたし、今私は、これはScalaは必要とし、javaの私の仮想マシンが1.4またはその

のようなものを使用してJava 5の言語機能であるように、新しいエラー

Compiling 1 source file to C:\Users\Para\Documents\NetBeansProjects\Barbut\build\compiled 
C:\Users\Para\Documents\NetBeansProjects\Barbut\build\compiled\scala\reflect\ScalaSignature.class: warning: Cannot find annotation method 'value()' in type 'java.lang.annotation.Retention': class file for java.lang.annotation.Retention not found 
An exception has occurred in the compiler (1.6.0_18). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. 
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.annotation.RetentionPolicy not found 
C:\Users\Para\Documents\NetBeansProjects\Barbut\nbproject\build-impl.xml:379: Compile failed; see the compiler error output for details. 
BUILD FAILED (total time: 1 minute 2 seconds) 

はそう取得します

これを受け入れる方法はありますか?

0

あなたのスカラアプリケーションのjarがそれに依存しているので、おそらくスカラライブラリのjarファイルがありません。 NoClassDefFoundError forを受け取るクラスscala/ScalaObjectは、そのライブラリに存在します。

http://www.scala-lang.org/downloadsからダウンロードできます。あなたのscalaアプリケーションがビルドされたものと同じバージョンを取得してください。

+0

こんにちは、私はそれを試して、今私は新しいエラーを得る – Para

+0

私はそれがあなたが今得たそのエラーを渡すことは難しいと思う。これは、あなたがjdk5メソッドと言っているように、javameはjavaのサブセットです。あなたが本当に必死なら、あなたはRetroTranslatorやRetroWeaverを調べたいかもしれません(http://stackoverflow.com/questions/1011706/backport-java-5-6-features-to-java-1-4/1098923#1098923を参照)。 )しかし、私はあまりにも高いために私の希望を得ることはありません。 – thoredge

関連する問題