i'm john i'm newbie in javafx programming. i have several querstion that i don't
understand from this code (this code is using for create animation time) :
check this link for detail :
check this out
first :
there is two source code, what shouls i do? i'm really beginer in javafx programming, should i to create new package or new class or what? i'm currently use NET BEANS 7.2 ?
second :
i choose new class than I copied your code into my "JAVAFX application project" (is that right ?) than i have 2 file first is analogclock.java and the second one is analogclockwork.java than i got 3 error,
in analogclock.java i found error in this code
- clockwork.hourHandAngle()
- clockwork.minuteHandAngle()
- clockwork.minuteHandAngle()
error -> "Cannot find symbol, symbol : method minuteHandAngle()
location: variable clockwork of type AnalogClock
----"
can you help me? i really need your help for my colage work.
thanks for your help, i’m really appreciate it.
note :
i think i create class in same package (javafxapplication 5 package in my case)
sorry i really new in javafx programming and actually i never use netbeans 7.2, i got this task from my lecture. i don't unserstand in your point 3,4,5 particularly in point 4, this is my project properties :
- AnalogClock
- Source Packages
- AnalogClock
- AnalogClock.java
- se.crisp.clock
- AnalogClockwork.java
-libraries
- Default JavaFx Platform
is that right?
i think i create class in same package (javafxapplication 5 package in my case)
- You should not do that.
Seems you have missed a class in your package.
Do this :-
Create New Project lets name it AnalogClock
create new package under source packages and name it se.crisp.clock (from the above example)
Copy all the classes one by one and add under the above package. Use the same class name.
Add javafx related jars in project -> properties -> library
Clean and build & Run
Related
I downloaded the release build without modifying (https://www.lwjgl.org/customize)
I put all the classes in Eclipse. Some classes are not recognized
The codes that do not need these classes in error, work normally. As in https://www.lwjgl.org/guide
All the classes I put:
joml-1.10.1.jar
joml-1.10.1-javadoc.jar
joml-1.10.1-sources.jar
lwjgl.jar
lwjgl-assimp.jar
lwjgl-assimp-javadoc.jar
lwjgl-assimp-natives-windows.jar
lwjgl-assimp-sources.jar
lwjgl-bgfx.jar
lwjgl-bgfx-javadoc.jar
lwjgl-bgfx-natives-windows.jar
lwjgl-bgfx-sources.jar
lwjgl-cuda.jar
lwjgl-cuda-javadoc.jar
lwjgl-cuda-sources.jar
lwjgl-egl.jar
lwjgl-egl-javadoc.jar
lwjgl-egl-sources.jar
lwjgl-glfw.jar
lwjgl-glfw-javadoc.jar
lwjgl-glfw-natives-windows.jar
lwjgl-glfw-sources.jar
lwjgl-javadoc.jar
lwjgl-jawt.jar
lwjgl-jawt-javadoc.jar
lwjgl-jawt-sources.jar
lwjgl-jemalloc.jar
lwjgl-jemalloc-javadoc.jar
lwjgl-jemalloc-natives-windows.jar
lwjgl-jemalloc-sources.jar
lwjgl-libdivide.jar
lwjgl-libdivide-javadoc.jar
lwjgl-libdivide-natives-windows.jar
lwjgl-libdivide-sources.jar
lwjgl-llvm.jar
lwjgl-llvm-javadoc.jar
lwjgl-llvm-natives-windows.jar
lwjgl-llvm-sources.jar
lwjgl-lmdb.jar
lwjgl-lmdb-javadoc.jar
lwjgl-lmdb-natives-windows.jar
lwjgl-lmdb-sources.jar
lwjgl-lz4.jar
lwjgl-lz4-javadoc.jar
lwjgl-lz4-natives-windows.jar
lwjgl-lz4-sources.jar
lwjgl-meow.jar
lwjgl-meow-javadoc.jar
lwjgl-meow-natives-windows.jar
lwjgl-meow-sources.jar
lwjgl-nanovg.jar
lwjgl-nanovg-javadoc.jar
lwjgl-nanovg-natives-windows.jar
lwjgl-nanovg-sources.jar
lwjgl-natives-windows.jar
lwjgl-nfd.jar
lwjgl-nfd-javadoc.jar
lwjgl-nfd-natives-windows.jar
lwjgl-nfd-sources.jar
lwjgl-nuklear.jar
lwjgl-nuklear-javadoc.jar
lwjgl-nuklear-natives-windows.jar
lwjgl-nuklear-sources.jar
lwjgl-odbc.jar
lwjgl-odbc-javadoc.jar
lwjgl-odbc-sources.jar
lwjgl-openal.jar
lwjgl-openal-javadoc.jar
lwjgl-openal-natives-windows.jar
lwjgl-openal-sources.jar
lwjgl-opencl.jar
lwjgl-opencl-javadoc.jar
lwjgl-opencl-sources.jar
lwjgl-opengl.jar
lwjgl-opengles.jar
lwjgl-opengles-javadoc.jar
lwjgl-opengles-natives-windows.jar
lwjgl-opengles-sources.jar
lwjgl-opengl-javadoc.jar
lwjgl-opengl-natives-windows.jar
lwjgl-opengl-sources.jar
lwjgl-openvr.jar
lwjgl-openvr-javadoc.jar
lwjgl-openvr-natives-windows.jar
lwjgl-openvr-sources.jar
lwjgl-opus.jar
lwjgl-opus-javadoc.jar
lwjgl-opus-natives-windows.jar
lwjgl-opus-sources.jar
lwjgl-ovr.jar
lwjgl-ovr-javadoc.jar
lwjgl-ovr-natives-windows.jar
lwjgl-ovr-sources.jar
lwjgl-par.jar
lwjgl-par-javadoc.jar
lwjgl-par-natives-windows.jar
lwjgl-par-sources.jar
lwjgl-remotery.jar
lwjgl-remotery-javadoc.jar
lwjgl-remotery-natives-windows.jar
lwjgl-remotery-sources.jar
lwjgl-rpmalloc.jar
lwjgl-rpmalloc-javadoc.jar
lwjgl-rpmalloc-natives-windows.jar
lwjgl-rpmalloc-sources.jar
lwjgl-shaderc.jar
lwjgl-shaderc-javadoc.jar
lwjgl-shaderc-natives-windows.jar
lwjgl-shaderc-sources.jar
lwjgl-sources.jar
lwjgl-sse.jar
lwjgl-sse-javadoc.jar
lwjgl-sse-natives-windows.jar
lwjgl-sse-sources.jar
lwjgl-stb.jar
lwjgl-stb-javadoc.jar
lwjgl-stb-natives-windows.jar
lwjgl-stb-sources.jar
lwjgl-tinyexr.jar
lwjgl-tinyexr-javadoc.jar
lwjgl-tinyexr-natives-windows.jar
lwjgl-tinyexr-sources.jar
lwjgl-tinyfd.jar
lwjgl-tinyfd-javadoc.jar
lwjgl-tinyfd-natives-windows.jar
lwjgl-tinyfd-sources.jar
lwjgl-tootle.jar
lwjgl-tootle-javadoc.jar
lwjgl-tootle-natives-windows.jar
lwjgl-tootle-sources.jar
lwjgl-vma.jar
lwjgl-vma-javadoc.jar
lwjgl-vma-natives-windows.jar
lwjgl-vma-sources.jar
lwjgl-vulkan.jar
lwjgl-vulkan-javadoc.jar
lwjgl-vulkan-sources.jar
lwjgl-xxhash.jar
lwjgl-xxhash-javadoc.jar
lwjgl-xxhash-natives-windows.jar
lwjgl-xxhash-sources.jar
lwjgl-yoga.jar
lwjgl-yoga-javadoc.jar
lwjgl-yoga-natives-windows.jar
lwjgl-yoga-sources.jar
lwjgl-zstd.jar
lwjgl-zstd-javadoc.jar
lwjgl-zstd-natives-windows.jar
lwjgl-zstd-sources.jar
You are trying to compile LWJGL 2 code here. All the imports that it cannot find pertain to the verison 2 of LWJGL. The current version that you can get from the mentioned lwjgl site is 3 and version 3 is incompatible with version 2.
Either explicitly download LWJGL 2 from e.g. http://legacy.lwjgl.org/ or rewrite your code to work with LWJGL 3.
If you go the LWJGL 2 route, though, please note that it hasn't been actively maintained anymore for more than 6 years now.
I'm trying the quickstart from here: http://datafu.incubator.apache.org/docs/datafu/getting-started.html
I tried nearly everything, but I'm sure it must be my fault somewhere. I tried already:
exporting PIG_HOME, CLASSPATH, PIG_CLASSPATH
starting pig with -cpdatafu-pig-incubating-1.3.0.jar
registering datafu-pig-incubating-1.3.0.jar locally and in hdfs => both succesful (at least no error shown)
nothing helped
Trying this on pig:
register datafu-pig-incubating-1.3.0.jar
DEFINE Median datafu.pig.stats.StreamingMedian();
data = load '/user/hduser/numbers.txt' using PigStorage() as (val:int);
data2 = FOREACH (GROUP data ALL) GENERATE Median(data);
or directly
data2 = FOREACH (GROUP data ALL) GENERATE datafu.pig.stats.StreamingMedian(data);
I get this name-resolve error:
2016-06-04 17:22:22,734 [main] ERROR org.apache.pig.tools.grunt.Grunt
- ERROR 1070: Could not resolve datafu.pig.stats.StreamingMedian using imports: [, java.lang., org.apache.pig.builtin.,
org.apache.pig.impl.builtin.] Details at logfile:
/home/hadoop/pig_1465053680252.log
When I look into the datafu-pig-incubating-1.3.0.jar it looks OK, everything in place. I also tried some Bag functions, same error then.
I think it's kind of a noob-error which I just don't see (as I did not find particular answers for datafu in SO or google), so thanks in advance for shedding some light on this.
Pig script is proper, the only thing that could break is that while registering datafu there were some class dependencies that coudn't been met.
Try to run locally (pig -x local) and see a detailed log.
Check also the version of pig - it should be newer than 0.14.0.
With reference to my previous question,
Executing a lisp function from Java
I was able to call lisp code from Java using ABCL.
But the problem is, the already existing lisp code uses CL-PPCRE package.
I can not compile the code as it says 'CL-PPCRE not found'.
I have tried different approaches to add that package,
including
1) how does one compile a clisp program which uses cl-ppcre?
2)https://groups.google.com/forum/#!topic/cl-ppcre/juSfOhEDa1k
Doesnot work!
Other thing is, that executing (compile-file aima.asd) works perfectly fine although it does also require cl-pprce
(defpackage #:aima-asd
(:use :cl :asdf))
(in-package :aima-asd)
(defsystem aima
:name "aima"
:version "0.1"
:components ((:file "defpackage")
(:file "main" :depends-on ("defpackage")))
:depends-on (:cl-ppcre))
The final java code is
interpreter.eval("(load \"aima/asdf.lisp\")");
interpreter.eval("(compile-file \"aima/aima.asd\")");
interpreter.eval("(compile-file \"aima/defpackage.lisp\")");
interpreter.eval("(in-package :aima)");
interpreter.eval("(load \"aima/aima.lisp\")");
interpreter.eval("(aima-load 'all)");
The error message is
Error loading C:/Users/Administrator.NUIG-1Z7HN12/workspace/aima/probability/domains/edit-nets.lisp at line 376 (offset 16389)
#<THREAD "main" {3A188AF2}>: Debugger invoked on condition of type READER-ERROR
The package "CL-PPCRE" can't be found.
[1] AIMA(1):
Can anyone help me?
You need to load cl-ppcre before you can use it. You can do that by using (asdf:load-system :aima), provided that you put both aima and cl-ppcre into locations that your ASDF searches.
I used QuickLisp to add cl-ppcre (because nothing else worked for me).
Here is what I did
(load \"~/QuickLisp.lisp\")")
(quicklisp-quickstart:install)
(load "~/quicklisp/setup.lisp")
(ql:quickload :cl-ppcre)
First 2 lines are only a one time things. Once quickLisp is installed you can start from line 3.
The following code works well in java:
import org.jfugue.*;
...............................
...............................
Player player = new Player();
Pattern pattern = new Pattern("C D E F G A B");
player.play(pattern);
But in activity in android I get the error at the last line of code 'player.play(pattern);' as:
"The type javax.sound.midi.Sequence cannot be resolved. It is indirectly referenced from required .classfile."
Kindly help me to get this code run in android.
Without any further knowledge of Android development this leaves two possibilities:
Dependency "javax.*" not available in your compiled version (.apk)
Dependency "javax.*" not supported.
A quick webresearch implies the second one: https://github.com/kshoji/USB-MIDI-Driver/wiki/javax.sound.midi-porting-for-Android
I am using Eclipse Juno and Java.
I was trying to create a new list:
List myList = new ArrayList();
This had an error and the resolution on it was along the lines of change compiler to 1.7 which I accepted. The errror on this list creation line was corrected however I now have many errors thoughout the whole project on lines that were previously working. Some examples are:
class GetAccountAndCubsHandler<T> implements AsyncCallback<List<AccountAndCubs>>
Multiple markers at this line
- The hierarchy of the type GetAccountAndCubsHandler is inconsistent
- List cannot he resolved to a type
public class AccountCreationView extends Composite {
Multiple markers at this line
- The hierarchy of the type AccountCreationView is inconsistent
- Breakpoint:AccountCreationView
#SuppressWarnings("unused")
private String accountId;
First line - Multiple markers at this line
- SuppressWarnings cannot be resolved to a type
- The attribute valie is undefined for the annotation type SuppressWarnings
Second line - String cannot be resolved to a type
As you can imagine having my whole project adversely affected in this way is very disconcerting so any advice on how to recover would be greatly appreciated.
Regards,
Glyn
"String cannot be resolved to a type"
Ensure that a valid JRE or JDK is specified in your build-path.
Since you're using Eclipse, right-click on your project, then Properties → Java Build Path.
Perhaps you don't have a Java 7 JRE configured in the Installed JREs preference panel.