Minecraft server clear already loaded .class files from JAR plugin - java

So my minecraft server has an economy plugin I've been working on. After battling a couple of days, I realised this is a common problem with Java that it won't unload the classes which are already loaded. So when I tried the plugin on a fresh server instance, it was working correct.
My question is how can I fix the original server? I tried deleting the updated JAR file from that server, ran and stopped the server as a guess that it'd remove the pre-loaded classes but instead that generated the files related to the previous version of plugin, even though the plugin's JAR wasn't in the directory.

First, what is not working? If it's crashing, please edit this and add a bit of the console log where the error is happening.
If it's working properly on another server make sure the JARs are all compiled from the latest source.
There could also be a conflict with another plugin. Try disabling all other plugins and see if it works than.

Related

Generating executable file in IntelliJ for Windows

I used to work on an IntelliJ project that was started before I started working on it. This project had a configuration that allowed me to generate an EXE file that could easily be sent to windows users.
It would generate a massive EXE file bundled with all the needed JARs of the application, and upon running it the first time, it would silently "install" itself into the AppData folder, as if it were a regular windows setup file, even though the user would not even notice it doing that installation.
I am trying to configure a project in IntelliJ to do the exact same thing, but first I have not been able to output the exe file by selecting "exe" as the Java FX native bundle type. It just generates a .jnlp and .jar file. When I select "all", as per some other post here in stackoverflow, it generates an exe file, but only with a few kb in size, which does not contain any of the .jar files that should be part of it. Moreover, when I try to open it, it just crashes saying the main class was not found.
Am I missing some setting for building the project? I am using IntelliJ 2018.3.2
Here are some screenshots:
I have been able to get past this error, after changing the verbosity of the compilation and going through the logs.
There was a log message which helped fixing this:
The process complained about the Inno Setup Compiler missing, which was right. Makes me wonder why IntelliJ would have that feature built in if it depends on external tools but does not notify the user clearly of this.
Detected [iscc.exe] version 0.0 but version 5.0 is required.
After going to the Inno Setup site, downloading and installing the tool, I was able to get the executable to be generated.
Now I am struggling with another error, which is the executable complaining about the main class referenced in the Artifact not being found, but at least I have moved past the first problem! Going to tackle this one now...
The best solution for this is using exe generator software.
There is plenty of exe generators out there.
EXE4J is the most simple & easy tool to use.
In EXE4J,
You can upload your main jar file and select the main class.
I think this will be solved your problem.
This may be due to you`ve extracted Jars to your output root, while you neet to Put it(you can check difference by deleting everything from your output root in Output Layout screen and then just right click on jar on the right side, you will see two options here, try another one

NoClassDefFoundError from GlassFish server but the code is being compiled from an IDE?

if someone could help that would be amazing.
This project is being started in the NetBeans IDE EE version that comes with GlassFish Server. I've used Lucene to make a searchable twitter index of ~5G and am getting the NoClassDefFoundError only when called from the server giving a 500 Page Error.
The problem really confuses me, NetBeans is able to compile and run the code. When I call my functions from the same project in the IDE I'm able to use it perfectly. When I compile to a WebProject and launch it seems like GlassFish isn't able to find the files but I've made sure it has all the jars in the WAR file in the proper directories.
I've tried this both manually adding all the library files and by using Maven. Neither have worked, I've even added classpaths to the files elsewhere and added the files to glassfishes /lib folder.
Here is my setup.
http://imgbin.org/images/22748.PNG
I guess the problem is that you are mixing two different versions of lucene together (3.4 and 4.0).
I don't know why this works on your local Glassfish instance but you should update your dependencies so that they all have the same version.

.bs files are generated while running a test in eclipse

I'm facing a strange issue while using Eclipse-Indigo (32 bit).
I'm running my code on my machine and code is not getting executed correctly, there is no exception/error shown but files with extenion ".bs" are getting generated.
The same code is executed correctly on a different machine. Can anyone suggest what might be the issue here?
Can anyone please atelast answer what does ".bs" files stand for? Is it bitstream?
Yes, so finally after lots of debugging, I was able to find solution to this.
Before I talk about solution, first thing, this has nothing to do with different eclipse versions or different java versions.
So, the .bs files were generated because the client and server had different versions of project jars (not the third party jars).
My client project in Eclipse was referring to older jars while the server had latest jars.
I think this problem will only occur if you have multiple dependent projects or project jars.

NetBeans not correctly compiling my Java sources

I am encountering a problem with NetBeans 7.4 (but also previous versions such as NetBeans 7.3). When I clean & build my Java Web application, it gets successfully built, but my newly added code is not included with that build.
I confirmed this by decompiling the classes to check whether my changes got through, but they did not.
I have tried different versions of NetBeans to see what happened. At one point in time, I also compiled the application through command line using ANT. I have also tried deleting the build and dist folders manually. None of these methods solved my issue.
The only, not acceptable solution is that I compile the class individually, then it is ok. But when I clean and build the whole application, the older sources are compiled.
Looking forward for some help, because I'm really lost, and compiling individually is not an option, since before releasing, I would like to use a single .war file.
This issue was a silly mistake. The web part of this project was retrieved by copying the web folder from the server in order to make sure that my team has the latest sources. By doing this the class files were being included within the WEB-INF folder, therefore, when attempting to rebuild the application, for some reason, the build was retaking the files within the Web/WEB-INF folder and not generating the classes from the sources.
When that folder was cleaned up from any class files, the project now builds successfully.

Warning: No deployer available in JDeveloper

I couldn't find any info in google on this one, someone changed properties on a project and I'm not sure why the project can no longer deploy to jar. It compiles ok, but won't build into a jar file even though the dependencies do so just fine.
Has anyone run into this issue in JDeveloper before?
I can rename the jar to a different name (it's a dependency as well) but I need that specific name to match up with the other project.
I'm working with JDeveloper 10g and the project has been building fine for the last few months, and just now I'm getting this error which I can find no source or help on.
I've fixed it, it plagued me for 3 days.
The project itself had some deploy profile stuck in it, directly in the properties file of the project, not the external "blah blah.deploy".
When looking under the "Miscellaneous Files" area I noticed an extra deploy file, i.e. two deploy files in that area even though I hadn't deployed yet. This is how I figured out it was stuck in the project properties not in the external files. Removing one of these from the project fixed the issue, although I imagine ridding the project of both and creating a new deploy profile (still need to do this) would also fix it.
10g for the lose :p

Categories