使用IDEA是报错Error: A JNI error has occurred, please check your installation and try again? 5C

我使用IDEA建了个普通java工程可以正常运行,不报错,但是我使用maven建了一个spring工程,直接报错

普通java工程这样的,运行也正常

图片说明

# 但是我建spring工程的时候,运行就报错

图片说明

完整报错是这样的

java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" 

求大神解答,好几天,搜了好多方法,都没用

3个回答

重新安装jdk,安装合适版本的jdk

sinat_37921768
sinat_37921768 我装的1.8,没问题啊
3 个月之前 回复
tiankongzhichenglyf
tkzc_shark 回复sinat_37921768: IDEA中sdk设置与tomcat配置jre设置为相同版本
3 个月之前 回复
sinat_37921768
sinat_37921768 这篇看过了,我的java和javac版本一样的
3 个月之前 回复

除了楼上的jdk冲突你应该还有文件没有或者路径不对的错误

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Jmeter安装启动JNI报错
ERROR:A JNI error has occurred,please check your installation and try again ![图片说明](https://img-ask.csdn.net/upload/201808/09/1533824464_313773.jpg) jmeter 2.6/3.0 jdk 1.7/1.8的版本都试过
SDL2 编译报错error: undefined reference to 'openslES_ResumeDevices' 求解决思路
android studio编译SDL2生成.so文件时,报错如下: ``` Build command failed. Error while executing process /Users/ing/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/Android.mk NDK_APPLICATION_MK=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/Application.mk APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/lib /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/libSDL2.so} [x86_64] Compile : SDL2 <= SDL.c [x86_64] Compile : SDL2 <= SDL_assert.c [x86_64] Compile : SDL2 <= SDL_dataqueue.c [x86_64] Compile : SDL2 <= SDL_error.c [x86_64] Compile : SDL2 <= SDL_hints.c [x86_64] Compile : SDL2 <= SDL_log.c [x86_64] Compile : SDL2 <= SDL_audio.c [x86_64] Compile : SDL2 <= SDL_audiocvt.c [x86_64] Compile : SDL2 <= SDL_audiodev.c [x86_64] Compile : SDL2 <= SDL_audiotypecvt.c [x86_64] Compile : SDL2 <= SDL_mixer.c [x86_64] Compile : SDL2 <= SDL_wave.c [x86_64] Compile : SDL2 <= SDL_androidaudio.c [x86_64] Compile : SDL2 <= SDL_dummyaudio.c [x86_64] Compile : SDL2 <= SDL_atomic.c [x86_64] Compile : SDL2 <= SDL_spinlock.c [x86_64] Compile : SDL2 <= SDL_android.c [x86_64] Compile : SDL2 <= SDL_cpuinfo.c [x86_64] Compile : SDL2 <= SDL_dynapi.c [x86_64] Compile : SDL2 <= SDL_clipboardevents.c [x86_64] Compile : SDL2 <= SDL_displayevents.c [x86_64] Compile : SDL2 <= SDL_dropevents.c [x86_64] Compile : SDL2 <= SDL_events.c /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:285:59: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERDOWN) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT' (uint) event->tfinger.timestamp, event->tfinger.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:285:59: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERDOWN) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT' event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:286:57: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERUP) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT' (uint) event->tfinger.timestamp, event->tfinger.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:286:57: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERUP) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT' event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:287:61: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERMOTION) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT' (uint) event->tfinger.timestamp, event->tfinger.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:287:61: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERMOTION) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT' event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:295:62: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_DOLLARGESTURE) PRINT_DOLLAR_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:292:51: note: expanded from macro 'PRINT_DOLLAR_EVENT' (uint) event->dgesture.timestamp, event->dgesture.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:295:62: warning: format specifies type 'long long' but the argument has type 'SDL_GestureID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_DOLLARGESTURE) PRINT_DOLLAR_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:293:17: note: expanded from macro 'PRINT_DOLLAR_EVENT' event->dgesture.gestureId, (uint) event->dgesture.numFingers, \ ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:296:61: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_DOLLARRECORD) PRINT_DOLLAR_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:292:51: note: expanded from macro 'PRINT_DOLLAR_EVENT' (uint) event->dgesture.timestamp, event->dgesture.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:296:61: warning: format specifies type 'long long' but the argument has type 'SDL_GestureID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_DOLLARRECORD) PRINT_DOLLAR_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:293:17: note: expanded from macro 'PRINT_DOLLAR_EVENT' event->dgesture.gestureId, (uint) event->dgesture.numFingers, \ ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:301:51: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] (uint) event->mgesture.timestamp, event->mgesture.touchId, ^~~~~~~~~~~~~~~~~~~~~~~ 11 warnings generated. [x86_64] Compile : SDL2 <= SDL_gesture.c [x86_64] Compile : SDL2 <= SDL_keyboard.c [x86_64] Compile : SDL2 <= SDL_mouse.c [x86_64] Compile : SDL2 <= SDL_quit.c [x86_64] Compile : SDL2 <= SDL_touch.c [x86_64] Compile : SDL2 <= SDL_windowevents.c [x86_64] Compile : SDL2 <= SDL_rwops.c [x86_64] Compile : SDL2 <= SDL_haptic.c [x86_64] Compile : SDL2 <= SDL_syshaptic.c [x86_64] Compile : SDL2 <= SDL_gamecontroller.c [x86_64] Compile : SDL2 <= SDL_joystick.c [x86_64] Compile : SDL2 <= SDL_sysjoystick.c [x86_64] Compile : SDL2 <= SDL_hidapi_ps4.c [x86_64] Compile : SDL2 <= SDL_hidapi_switch.c [x86_64] Compile : SDL2 <= SDL_hidapi_xbox360.c [x86_64] Compile : SDL2 <= SDL_hidapi_xboxone.c [x86_64] Compile : SDL2 <= SDL_hidapijoystick.c [x86_64] Compile : SDL2 <= SDL_sysloadso.c [x86_64] Compile : SDL2 <= SDL_power.c [x86_64] Compile : SDL2 <= SDL_syspower.c [x86_64] Compile : SDL2 <= SDL_sysfilesystem.c [x86_64] Compile : SDL2 <= SDL_sensor.c [x86_64] Compile : SDL2 <= SDL_androidsensor.c [x86_64] Compile : SDL2 <= SDL_d3dmath.c [x86_64] Compile : SDL2 <= SDL_render.c [x86_64] Compile : SDL2 <= SDL_yuv_sw.c [x86_64] Compile : SDL2 <= SDL_render_d3d.c [x86_64] Compile : SDL2 <= SDL_shaders_d3d.c [x86_64] Compile : SDL2 <= SDL_render_d3d11.c [x86_64] Compile : SDL2 <= SDL_shaders_d3d11.c [x86_64] Compile : SDL2 <= SDL_render_gl.c [x86_64] Compile : SDL2 <= SDL_shaders_gl.c [x86_64] Compile : SDL2 <= SDL_render_gles.c [x86_64] Compile : SDL2 <= SDL_render_gles2.c In file included from /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_render_gles2.c:273: /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_gles2funcs.h:58:1: warning: incompatible pointer types assigning to 'void (*)(GLuint, GLsizei, const GLchar **, const GLint *)' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-pointer-types] SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *)) ^ ~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_render_gles2.c:262:45: note: expanded from macro 'SDL_PROC' #define SDL_PROC(ret,func,params) data->func=func; ^~~~~ 1 warning generated. [x86_64] Compile : SDL2 <= SDL_shaders_gles2.c [x86_64] Compile : SDL2 <= SDL_render_psp.c [x86_64] Compile : SDL2 <= SDL_blendfillrect.c [x86_64] Compile : SDL2 <= SDL_blendline.c [x86_64] Compile : SDL2 <= SDL_blendpoint.c [x86_64] Compile : SDL2 <= SDL_drawline.c [x86_64] Compile : SDL2 <= SDL_drawpoint.c [x86_64] Compile : SDL2 <= SDL_render_sw.c [x86_64] Compile : SDL2 <= SDL_rotate.c [x86_64] Compile : SDL2 <= SDL_getenv.c [x86_64] Compile : SDL2 <= SDL_iconv.c [x86_64] Compile : SDL2 <= SDL_malloc.c [x86_64] Compile : SDL2 <= SDL_qsort.c [x86_64] Compile : SDL2 <= SDL_stdlib.c [x86_64] Compile : SDL2 <= SDL_string.c [x86_64] Compile : SDL2 <= SDL_thread.c [x86_64] Compile : SDL2 <= SDL_syscond.c [x86_64] Compile : SDL2 <= SDL_sysmutex.c [x86_64] Compile : SDL2 <= SDL_syssem.c [x86_64] Compile : SDL2 <= SDL_systhread.c [x86_64] Compile : SDL2 <= SDL_systls.c [x86_64] Compile : SDL2 <= SDL_timer.c [x86_64] Compile : SDL2 <= SDL_systimer.c [x86_64] Compile : SDL2 <= SDL_RLEaccel.c [x86_64] Compile : SDL2 <= SDL_blit.c [x86_64] Compile : SDL2 <= SDL_blit_0.c [x86_64] Compile : SDL2 <= SDL_blit_1.c [x86_64] Compile : SDL2 <= SDL_blit_A.c [x86_64] Compile : SDL2 <= SDL_blit_N.c [x86_64] Compile : SDL2 <= SDL_blit_auto.c [x86_64] Compile : SDL2 <= SDL_blit_copy.c [x86_64] Compile : SDL2 <= SDL_blit_slow.c [x86_64] Compile : SDL2 <= SDL_bmp.c [x86_64] Compile : SDL2 <= SDL_clipboard.c [x86_64] Compile : SDL2 <= SDL_egl.c [x86_64] Compile : SDL2 <= SDL_fillrect.c [x86_64] Compile : SDL2 <= SDL_pixels.c [x86_64] Compile : SDL2 <= SDL_rect.c [x86_64] Compile : SDL2 <= SDL_shape.c [x86_64] Compile : SDL2 <= SDL_stretch.c [x86_64] Compile : SDL2 <= SDL_surface.c [x86_64] Compile : SDL2 <= SDL_video.c [x86_64] Compile : SDL2 <= SDL_vulkan_utils.c [x86_64] Compile : SDL2 <= SDL_yuv.c [x86_64] Compile : SDL2 <= SDL_androidclipboard.c [x86_64] Compile : SDL2 <= SDL_androidevents.c [x86_64] Compile : SDL2 <= SDL_androidgl.c [x86_64] Compile : SDL2 <= SDL_androidkeyboard.c [x86_64] Compile : SDL2 <= SDL_androidmessagebox.c [x86_64] Compile : SDL2 <= SDL_androidmouse.c [x86_64] Compile : SDL2 <= SDL_androidtouch.c [x86_64] Compile : SDL2 <= SDL_androidvideo.c [x86_64] Compile : SDL2 <= SDL_androidvulkan.c [x86_64] Compile : SDL2 <= SDL_androidwindow.c [x86_64] Compile : SDL2 <= yuv_rgb.c [x86_64] Compile : SDL2 <= SDL_test_assert.c [x86_64] Compile : SDL2 <= SDL_test_common.c [x86_64] Compile : SDL2 <= SDL_test_compare.c [x86_64] Compile : SDL2 <= SDL_test_crc32.c [x86_64] Compile : SDL2 <= SDL_test_font.c [x86_64] Compile : SDL2 <= SDL_test_fuzzer.c [x86_64] Compile : SDL2 <= SDL_test_harness.c [x86_64] Compile : SDL2 <= SDL_test_imageBlit.c [x86_64] Compile : SDL2 <= SDL_test_imageBlitBlend.c [x86_64] Compile : SDL2 <= SDL_test_imageFace.c [x86_64] Compile : SDL2 <= SDL_test_imagePrimitives.c [x86_64] Compile : SDL2 <= SDL_test_imagePrimitivesBlend.c [x86_64] Compile : SDL2 <= SDL_test_log.c [x86_64] Compile : SDL2 <= SDL_test_md5.c [x86_64] Compile : SDL2 <= SDL_test_memory.c [x86_64] Compile : SDL2 <= SDL_test_random.c [x86_64] Compile++ : hidapi <= hid.cpp [x86_64] Prebuilt : libc++_shared.so <= <NDK>/sources/cxx-stl/llvm-libc++/libs/x86_64/ [x86_64] SharedLibrary : libhidapi.so [x86_64] SharedLibrary : libSDL2.so /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/objs-debug/SDL2/src/audio/SDL_audio.o:SDL_audio.c:bootstrap: error: undefined reference to 'openslES_bootstrap' /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:105: error: undefined reference to 'openslES_PauseDevices' /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:112: error: undefined reference to 'openslES_ResumeDevices' /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:156: error: undefined reference to 'openslES_PauseDevices' /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:167: error: undefined reference to 'openslES_ResumeDevices' clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/libSDL2.so] Error 1 ``` 感觉是调用opengl 的相关库时报错,未引用。请教有遇到过此类问题的或者有解决思路的,请不吝赐教。。
以前jdk装在c盘的,重装在D盘后出错!试了网上的各种办法都没用
C:\Users\13350>java version Exception in thread "main" java.lang.NoClassDefFoundError: version Caused by: java.lang.ClassNotFoundException: version at java.net.URLClassLoader$1.run(URLClassLoader.java:220) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:208) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) Error: Could not find the main class. Error: A JNI error has occurred, please check your installation and try again
本地运行spark,JNI error, NoClassDefFoundError
异常信息如下:运行spark 的wordcount demo,引用 的jar都依赖好好的, 部署spark 的时候遇见过类似错误,通过环境变量指定hadoop的jni就好了,现在在本机ide不知道该怎么办了 Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/api/java/function/FlatMapFunction at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) Disconnected from the target VM, address: '127.0.0.1:58564', transport: 'socket' at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: org.apache.spark.api.java.function.FlatMapFunction at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more
uiautomatorviewer.bat闪退,请大神指点
cmd闪退前报错信息如下: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/session/web/http/CookieSerializer at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: org.springframework.session.web.http.CookieSerializer at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more ———————————————— 版权声明:本文为CSDN博主「javafanwk」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/fwk19840301/article/details/90291773
springboot gradle项目build成功,但是bootrun的时候失败了,折腾半天了,没有解决问题,跪求大神解答
> Task :app-ygrs-weixin:bootRun FAILED D:\IdeaProjects\microrada\app-ygrs-weixin\build\libs\app-ygrs-weixin-pathing.jar java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:650) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:632) Caused by: java.lang.ClassNotFoundException: javax.servlet.Filter at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" FAILURE: Build failed with an exception.
坐等,调用别人写好的JNI报错
错误如下: [armeabi-v7a] Compile++ thumb: hue_core <= NativeServer.cpp In file included from F:/GuohuaLight_JNI//jni/NativeServer.cpp:10:0: F:/GuohuaLight_JNI//jni/event_server.h:13:28: fatal error: android/looper.h: No such file or directory compilation terminated. make.exe: *** [F:/GuohuaLight_JNI//obj/local/armeabi-v7a/objs-debug/hue_core/NativeServer.o] Error 1 导致cpp代码一片红,各种报错;坐等各路大神回答
Android Studio的项目运行时报错:Error configuring CMake server
# 问题背景 我在跟着csdn上的一个教程尝试用Android Studio(3.4.1) 做一个变声器的app项目,fmod的so库都导入进项目的libs了 ,build.gradle和cmakelist.txt也都按照那个教程配置了。 [AS制作变声器](https://blog.csdn.net/a_thousand_miles/article/details/81150906 "") 后来报错说不支持armeabi,网上查了下发现NDK17以上都不 支持了,遂下载了ndk16b替换之前的ndk17,ndk的location 也都改过了,然后终于build成功,开心。 但是插上usb准备在手机上运行测试下的时候,出现这个报错 ,Google了也没解决掉。报错:Error configuring CMake server (E:\Android\Sdk\cmake\3.10.2.4988404\bin). ![图片说明](https://img-ask.csdn.net/upload/201909/29/1569748738_97421.png) ** 有大佬知道怎么回事儿吗?** ###代码(build.gradle) ``` apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.example.qq_voicechanger01" minSdkVersion 15 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { cppFlags "" abiFilters 'armeabi','x86' } } //编译平台 ndk{ abiFilters "armeabi","x86" } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } externalNativeBuild { cmake { path "src/main/cpp/CMakeLists.txt" version "3.10.2" } } //目录 sourceSets.main{ jniLibs.srcDirs = ['libs'] jni.srcDirs = [] } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } ``` ###代码(cmakelist.txt) ``` cmake_minimum_required(VERSION 3.4.1) find_library(log-lib log ) set(my_lib_path ${CMAKE_SOURECE_DIR}/libs) #添加第三方的so库 add_library( libfomd SHARED IMPORTED) #指明第三方so库的绝对路径 set_target_properties( libfmod PROPERTIES IMPORTED_LOCATION ${my_lib_path}/${ANDROID_ABI}/libfmod.so ) add_library( libfmodL SHARED IMPORTED ) set_target_properties( libfmodL PROPERTIES IMPORTED_LOCATION ${my_lib_path}/${ANDROID_ABI}/libfmodL.so ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") #添加我们需要编译的cpp绝对路径 add_library( changeVoice SHARED src/main/cpp/play_sound.cpp src/main/cpp/common.cpp src/main/cpp/common_platform.cpp ) #导入路径,使编译时能找到这个文件夹 include_directories(src/main/cpp/inc) #连接好三个路径 target_link_libraries( changeVoice libfmod libfmodL ${log-lib} ) ```
运行esclipse的Java程序向Oracel数据库更新数据,运行后报错
就是这个用那个Oracle数据库插入数据 以下代码: package jdbc; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class ojdbc { public static final String URL="jdbc:oracle:thin:@localhost:1521:ORCL"; public static final String USERNAME="system"; public static final String PASSWORD="a123"; public static void update() {// 数据库连接要抛出异常 Statement stmt = null; Connection con = null; try { Class.forName("oracle.jdbc.OracleDriver"); con = DriverManager.getConnection(URL, USERNAME, PASSWORD); stmt = con.createStatement(); String sql = "insert into student values('55 ','66666')"; int count = stmt.executeUpdate(sql); if (count > 0) { System.out.print("successful"); } }catch (SQLException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); }catch (Exception e) { e.printStackTrace(); } finally { try { if(stmt!=null)stmt.close(); if(stmt!=null)con.close(); }catch(SQLException e) { e.printStackTrace(); } } } public static void main(String[] args) throws ClassNotFoundException, SQLException { update(); } } 运行后报ERROR:A JNI error has occurred,please check your installation and try again. 正常应该没错啊,我又不是java开头的命名,Oracle11g安装没问题,账号密码也没问题,Oracle11g也已经跟Oracle Developer建立连接,但是为什么?
jni调用java方法报错!!!
12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] JNI DETECTED ERROR IN APPLICATION: calling static method java.lang.String com.library.utils.MD5Utils.md5(java.lang.String) with CallObjectMethod 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] in call to CallObjectMethod 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] from java.lang.String com.mb.library.nativeutils.DmCoding.getMD5(java.lang.String) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] "main" prio=5 tid=1 Runnable 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] | group="main" sCount=0 dsCount=0 obj=0x752bf000 self=0xf4827800 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] | sysTid=23825 nice=0 cgrp=default sched=0/0 handle=0xf74bbbec 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] | state=R schedstat=( 387939683 56711068 527 ) utm=33 stm=5 core=0 HZ=100 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] | stack=0xff7b0000-0xff7b2000 stackSize=8MB 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] | held mutexes= "mutator lock"(shared held) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at com.mb.library.nativeutils.DmCoding.getMD5(Native method) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at com.colorpick.activity.CorCppTestActivity.onClick(CorCppTestActivity.java:53) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at android.view.View.performClick(View.java:4908) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at android.view.View$PerformClick.run(View.java:20378) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at android.os.Handler.handleCallback(Handler.java:815) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at android.os.Handler.dispatchMessage(Handler.java:104) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at android.os.Looper.loop(Looper.java:194) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at android.app.ActivityThread.main(ActivityThread.java:5691) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at java.lang.reflect.Method.invoke!(Native method) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at java.lang.reflect.Method.invoke(Method.java:372) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) 12-04 11:33:08.818: A/art(23825): art/runtime/check_jni.cc:70] 12-04 11:33:08.818: A/libc(23825): Fatal signal 6 (SIGABRT), code -6 in tid 23825 (com.colorpick)
JNI error accessed deleted global reference
04-18 16:10:20.420: I/dalvikvm(13815): **JNI ERROR (app bug): accessed deleted global reference 0x1d5004ea** 04-18 16:10:20.420: E/dalvikvm(13815): VM aborting 04-18 16:10:20.420: A/libc(13815): Fatal signal 6 (SIGABRT) at 0x000035f7 (code=-6), thread 13815 (rbitrarycontrol) 04-18 16:42:21.740: E/dalvikvm(15671): **JNI ERROR (app bug): accessed stale global reference 0x1d300526 (index 329 in a table of size 328)** 04-18 16:42:21.740: E/dalvikvm(15671): VM aborting 04-18 16:42:21.740: A/libc(15671): Fatal signal 6 (SIGABRT) at 0x00003d37 (code=-6), thread 15671 (rbitrarycontrol)
请教下:在JNI某类构造方法里添加了PdhAddCounter,返回值一直不正确!
在JNI某个类的构造方法里添加了PdhAddCounter(query,_TEXT("\\PhysicalDisk(_Total)\\Disk Bytes/sec"), NULL, &counter);调式不报错,可java程序没运行到该类构造方法时,就停住了,不报错,也不往下执行!也就是停在该方法上。其返回值验证都没有到,请高手赐教解决方法。
Android java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in
添加了ZXing的依赖,出现64K问题,解决完64k问题之后,报 java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app-lib/com.example.santintrestaurant-1/libQt5Core.so"
NDK开发的时候遇到error: undefined reference to 错误
大家好,我在正在将C++的一些代码通过ndk调用到android项目里面去,但是在出现了一个很奇怪的错误; /bin/ld: ./obj/local/armeabi/objs/TestNDK2/TestNDK2.o: in function Java_com_example_testndk2_MainActivity_stringTestNdk(_JNIEnv*, _jobject*):jni/TestNDK2.cpp:15: error: undefined reference to 'CFeatureExtract::CFeatureExtract()' collect2: ld returned 1 exit status make: *** [obj/local/armeabi/libTestNDK2.so] Error 1 我调用jni的文件代码为: #include <string.h> #include "FeatureExtract.h" #include "Output.h" #include <jni.h> jstring Java_com_example_testndk2_MainActivity_stringTestNdk( JNIEnv* env, jobject thiz ) { COutput * pout; pout = new COutput(); CFeatureExtract *pFtr; pFtr=new CFeatureExtract(); return (env)->NewStringUTF("Hello from JNI and anbo !"); } mk文件也编写好了,应该没什么问题,之所以说没问题是因为,我在上面调用了其他cpp文件的 output.cpp和FeatureExtract.cpp等好几个cpp文件,当我把 pFtr=new CFeatureExtract(); 这行去掉的时候,会发现不再报错。下面是我的mk的代码: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libFeatureExtract LOCAL_SRC_FILES := OnlineFtr.cpp OnlineNorm.cpp FeatureExtract.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/include include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := libOutput LOCAL_SRC_FILES := LQDFR.cpp Classifier.cpp Output.cpp include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := TestNDK2 LOCAL_SRC_FILES := TestNDK2.cpp LOCAL_STATIC_LIBRARIES := libFeatureExtract LOCAL_STATIC_LIBRARIES := libOutput include $(BUILD_SHARED_LIBRARY) 最后是我CFeatureExtract构造函数的代码: CFeatureExtract::CFeatureExtract() { nmdir = 0; nwid = zone*zstep; pNorm = new COnlineNorm; pFeatr = new COnlineFtr( nwid ); //edit by anbo trajnorm = NULL; new_ptnum =0; new_ptnum_total=0; strokeEnd=0; strokeBegin=0; countStroke=0; GaussModel_probability =0; } 下面是.h头文件的部分声明 class CFeatureExtract{ public: CFeatureExtract(); ~CFeatureExtract(); 非常想知道到底哪里错了啊!感谢!
java netty NoClassDefFoundError 找不到eventloop class
在eclipse上用用netty框架写了个demo,直接在eclipse上能编译运行成功,导出了个jar包, 用java -jar 运行后,报出了如下错误: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: io/netty/channel/Even tLoopGroup at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetMethodRecursive(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at sun.launcher.LauncherHelper.validateMainClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: io.netty.channel.EventLoopGroup at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 7 more 最开始以为是包没打好, 又重新在manifest里面定义了一下classpath,完事一样还是找不到eventloopgroup class,我工程里面就引用了一个netty-5.0.0.Alpha2,我看了一下这个包,class文件好好的静静的就躺在那里........为什么它找不到,求大神们给个解决方案。。。。
android jni使用,报错:Fatal signal 11 (SIGSEGV) code 2
代码如下: java代码: 打印语句: GeneratorCode generatorCode = new GeneratorCode(); ret = generatorCode.createpaycode("20150406164710" "12345655", ""); Log.d("tag", "ret = " + ret); ``` GeneratorCode类: public class GeneratorCode { static { System.loadLibrary("PayCode"); } public native String createpaycode(String datetime, String id, String paycode); } ``` jni代码: ``` JNIEXPORT jstring JNICALL Java_com_suning_mobile_epa_scancode_encode_GeneratorCode_createpaycode (JNIEnv * env, jobject thiz, jstring datetime, jstring id, jstring paycode) { char *char_datatime = (*env)->GetStringUTFChars(env, datetime, 0); char *char_id = (*env)->GetStringUTFChars(env, id, 0); char *char_paycode = (*env)->GetStringUTFChars(env, paycode, 0); char *ret = createpaycode(char_datatime, char_id, char_paycode); return (*env)->NewStringUTF(env, ret); } ``` 问题现象: so文件调用通过,ret = 12312312312321(随意值),也会被打印,然后就会抛出 ret = 308639390531814296(先打印这条语句) Fatal signal 11 (SIGSEGV), code 2, fault addr 0x3234313c in tid 21134 (GL updater) (抛出错误,程序奔溃) ``` ```
新手错误Error:Execution failed for task
今天弄了一个直播sdk下来测试,在新创建的一个空项目里引入了sdk包,没想到更新完gradle,就报出了这个错误,完整如下: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple errors, see logs 还有相关的信息提示:Information:Gradle tasks [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :liveRtmpPushSDK:generateDebugSources, :liveRtmpPushSDK:generateDebugAndroidTestSources, :liveRtmpPushSDK:mockableAndroidJar, :liveRtmpPushSDK:prepareDebugUnitTestDependencies] 以下是空项目的build.gradle信息: apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "26.0.1" defaultConfig { applicationId "com.example.lin.videotest" minSdkVersion 15 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' compile project(':liveRtmpPushSDK') } 如下是直播sdk的build.gradle信息 apply plugin: 'com.android.library' android { compileSdkVersion 19 buildToolsVersion '25.0.0' defaultConfig { minSdkVersion 19 targetSdkVersion 19 // ndk { // moduleName "fdk-aac" // cFlags "-IE:/AS_code/LiveRtmpPushSDKDemo/liveRtmpPushSDK/src/main/jni -IE:/AS_code/LiveRtmpPushSDKDemo/liveRtmpPushSDK/src/main/jni/include -IE:/AS_code/LiveRtmpPushSDKDemo/liveRtmpPushSDK/src/main/jni/svc" // ldLibs "log", "z", "stdc++" // } } sourceSets.main { jni.srcDirs = [] jniLibs.srcDir 'src/main/libs' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile 'com.android.support:support-v4:18.0.0' }
VS2017开发Android报错Could not activate JNI Handle 0x7fde595150 (key_handle 0xd3e1bc2) of Java type 'md55f3b1401088a5d32c45c48cc894c2e25/MainActivity
项目是之前别的同事做的,同事辞职了,我接手这个项目,然后在的电脑上面安装VS2017开发环境,安装完成运行就报这个错误。![图片说明](https://img-ask.csdn.net/upload/201910/19/1571468151_26448.png)
cocos2d-x移植Android平台 Jni/hellocpp/main.cpp报错
#include "AppDelegate.h" #include "cocos2d.h" #include "CCEventType.h" #include "platform/android/jni/JniHelper.h" #include <jni.h> #include <android/log.h> #define LOG_TAG "main" #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) using namespace cocos2d; extern "C" { jint JNI_OnLoad(JavaVM *vm, void *reserved) { JniHelper:: ** *setJavaVM(vm);* ** //这里报错 return JNI_VERSION_1_4; } void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h) { if (!CCDirector:: ** *sharedDirector()->getOpenGLView()* ** )//这里报错 { CCEGLView *view = CCEGLView:: ** *sharedOpenGLView()* ** ;//这里报错 view->setFrameSize(w, h); *//这里报错* *AppDelegate* ** *pAppDelegate = new AppDelegate(); CCApplication:: ** *sharedApplication()->run()* ** ;//这里报错 } /* else { ccDrawInit(); ccGLInvalidateStateCache(); CCShaderCache::sharedShaderCache()->reloadDefaultShaders(); CCTextureCache::reloadAllTextures(); CCNotificationCenter::sharedNotificationCenter()->postNotification(EVNET_COME_TO_FOREGROUND, NULL); CCDirector::sharedDirector()->setGLDefaultValues(); } */ } } 错误信息:E:/android-ndk-r8e-windows-x86_64/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/Scene/Menu.o: in function Menu::update(float):jni/../../Classes/Scene/Menu.cpp:119: error: undefined reference to 'AboutScene::scene()' collect2: ld returned 1 exit status make: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
开源一个功能完整的SpringBoot项目框架
福利来了,给大家带来一个福利。 最近想了解一下有关Spring Boot的开源项目,看了很多开源的框架,大多是一些demo或者是一个未成形的项目,基本功能都不完整,尤其是用户权限和菜单方面几乎没有完整的。 想到我之前做的框架,里面通用模块有:用户模块,权限模块,菜单模块,功能模块也齐全了,每一个功能都是完整的。 打算把这个框架分享出来,供大家使用和学习。 为什么用框架? 框架可以学习整体
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成喔~) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch
深深的码丨Java HashMap 透析
HashMap 相关概念 HashTab、HashMap、TreeMap 均以键值对像是存储或操作数据元素。HashTab继承自Dictionary,HashMap、TreeMap继承自AbstractMap,三者均实现Map接口 **HashTab:**同步哈希表,不支持null键或值,因为同步导致性能影响,很少被使用 **HashMap:**应用较多的非同步哈希表,支持null键或值,是键值对...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
JDK12 Collectors.teeing 你真的需要了解一下
前言 在 Java 12 里面有个非常好用但在官方 JEP 没有公布的功能,因为它只是 Collector 中的一个小改动,它的作用是 merge 两个 collector 的结果,这句话显得很抽象,老规矩,我们先来看个图(这真是一个不和谐的图????): 管道改造经常会用这个小东西,通常我们叫它「三通」,它的主要作用就是将 downstream1 和 downstre...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
相关热词 c# 输入ip c# 乱码 报表 c#选择结构应用基本算法 c# 收到udp包后回包 c#oracle 头文件 c# 序列化对象 自定义 c# tcp 心跳 c# ice连接服务端 c# md5 解密 c# 文字导航控件
立即提问