問題タブ [drjava]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - パッケージ org.pdfbox.cos が存在しません
PDFBox をインポートして使用しようとしていますが、私が信じている jar のインストールに問題があります。
Dr. Java を使用しており、pdfbox-1.8.6.jar と pdfbox-app-1.8.6.jar の両方を Extra Classpath のリソースの場所に追加しました。
ただし、コードを実行すると、まだ jar が認識されません。
jar を機能させるには、他にどのような手順を実行する必要がありますか?
eclipse - Problems with DrJava's interactions pane, eclipse plug-in
I am using DrJava's plugin for Eclipse (4.3), and the interactions pane "view" is acting funny. (Very similar to this guy from 2011). Unfortunately, his question has no responses.
I also found this, however it's from 2004, and hasn't solved my problem.
DrJava refuses to acknowledge or instantiate objects, even though it throws no error.
I'm not sure why this happens, as it does not give an error on the import.
I also tried this:
To be sure it was a problem with the plug in, and not java itself, I entered the same code into the interactions pane in drjava (20130901-r5756). It worked as expected here:
So I have two questions:
- How can I fix the plug-in not acknowledging the creation of objects?
- Is there anyway to change the working directory in the plugin? I've only found this possible in Dr.Java IF a new Project is created, or under Preferences -> Resources -> Extra ClassPath. This is because I have different projects in different folders, and I'd like to test the classes, but I can't change my classpath to their location.
This is my first post on SO, please let me know if this questions needs any edits, or is not clear enough.
Thanks.
java - プログラムをリセットせずに、さまざまな変数で動作させるにはどうすればよいですか?
私の質問は、一般的に、このプログラムをリセットせずに機能させるにはどうすればよいですか? 私はこれが初めてで、コード全体をリセットせずに、ユーザーが華氏のいくつかの変数を一気に入力できるようにすることで、スキャナー機能を何らかの形でループしたいと考えています。
前もって感謝します
java - 必要な結果が得られないループ、スタック
V
を使用して印刷しようとしてい*
ます。どういうわけか、コードを実行すると、同じ行に 2 つの星が出力されます。私はこれに行き詰まっており、与えられた情報をどのように広めるべきかを見つけることができないようです. Scanner
の高さの数値の入力にを使用しV
ます。
java - 'in' が閉じられることはありません
コードにエラーがあり、警告が表示されます
警告: リソース リーク: 'in' は決して閉じられません
以前にこの問題が発生したことはありません。実際、私が書いた古いプログラムを試してみましたが、それでも同じ問題が発生します。これを修正するにはどうすればよいですか?
recursion - 再帰の問題。このメソッドをドライバーで実行すると、コンパイルはされてもクラッシュするのはなぜですか?
// int を受け取り、その数の星を出力する再帰メソッド。//最初の if ステートメントが適切な Java 形式ではないことはわかっていますが、階乗 = (n-1) と同じ行に nStars(n) があると、コンパイル中にエラーが発生します。
java - DrJavaが実行しているコマンドを確認する方法は?
Q : [コンパイル] をクリックしたときに DrJava が実際に実行しているコマンドを確認するにはどうすればよいですか?
CONTEXT : 外部の .jar を使用する簡単なテスト プログラムを作成しました。[編集] > [設定] > [リソースの場所] > [追加のクラスパス] > [追加] を使用して、DrJava にその .jar へのパスを追加しました。javac
DrJavaから実際にどのように呼び出されるのか知りたいです。例えそうですか
javac -cp <path to the .jar> myprogram.java
また
javac -cp .;<path to the .jar> myprogram.java
または、他の何か?
java - コンパイル中に NullPointerException が発生するのはなぜですか?
こんにちは、私は現在、Java プログラミング コースの試験の課題に取り組んでいます。現在、このプログラムをエラーなしで実行しようとしています。誰かが私が間違っていることを理解するのを手伝ってもらえますか? 私はこのコードを持っていますが、NullPointerException で行き詰まります:
java.lang.NullPointerException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method で。 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272) での呼び出し (不明なソース)