C# pack.xz garbage after end of pack archive [closed] - java

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have a C# program that should download a file from the internet and extract it.
The file is a .pack.xz file, i have no problem extracting the .xz, i tried even manually checking the checksum of the file and it was downloaded correctly.
For instance, one of the files i have to download is this:
http://files.minecraftforge.net/maven/com/typesafe/akka/akka-actor_2.11/2.3.3/akka-actor_2.11-2.3.3.jar.pack.xz
I downloaded it from the browser, then extracted the .xz part with 7zip and it was ok. Now i have a .pack file, i tried to unpack it with Java's unpack200 but it says me "garbage after end of pack archive".
It extracts the file anyway but it's corrupted infact if i open it with winrar it says unexpected end of archive. The jar file i extracted was 2,350,874 bytes while it should have been 2,553,197 bytes.
I really don't know how to solve it. I even checked some online programs but they seems to do the same thing i do the same way i do it so i can't figure out what's the problem

As a workaround, you can grab this JAR from a different Maven repository, such as the Central Repository (which has this specific JAR and a bunch of newer versions). See this search to find all the versions. The older version in your original link is on the second page of this search (although it may be less functional or less secure than the latest version).

Related

Embedding Executable (.exe) files into php [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Basically I want to embed the executable file of "Catacomb Snatch" [new Mojang game] into my html webpage. I've looked around but I can't seem to find much information on this.
If it would make it easier I could even us a mixture of php[instead of html] and an exe [instead of java]to actually get it to work on my page.
What is the simplest way to embed the jar or exe file into a html or php page?
Information much appreciated.
An .exe file is a windows executable file. This means your website won't be able to run it, except if it is a windows server.
In case of a windows server, PHP will still not be able to run an .exe file. PHP can run shell commando's, as stated in the php manual with shell_exec, which can run the .exe file. This will only execute the file on the server tho. Embedding an .exe file is impossible, except if you mean to make it a download.
If you wish make the .exe a download, this answer on stack overflow describes perfectly how to do that.
To run a jar file on your website, you can use a java applet, which would the the simplest way.
Applet tags are not supported in HTML5

Best Pratice: Eclipse Project share in department (no versioning) [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I created an Java application under the use of Eclipse. Now the application will be running in production. However, if there should be a change in near future, another user of my department should be able to grab the code and improve it.
How would we achieve this, without any versioning software / repository (like SVN ors so)?
Is it a good practice for such a small bit of code, to just export the project as ZIP File and others just import them into their workspace?
It is not a best practice to not use any version control software.
However, if you really want to do it there are many ways. One way I would say is by using a shared folder (assuming that you all are on the same network).
Right click on your Project on Eclipse, then export to your localhost, zip the code and copy it to the shared folder. If your folder is shared on network, others can get the updated code anytime they need it once you update the shared folder. But whoever gets the code will have to make sure that their localhost workspace is updated properly.
I would suggest, you create folders inside the shared folder like dev/tst/stg/prod and copy the code accordingly. And also make sure that you are not replacing any previous stable code in case if you want to revert the changes.
For instance, if it is dev then create a folder with today's date and copy the code changes done today so that it will be easy for any new person to get the latest code and work on.
If you are not on the same network but both got access to internet then you may use Dropbox to share the code. Hope my response help you.

When do we need to attach source to a jar [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
When do we need to attach source to a jar?
Can we debug without attaching the source code?
Can we see the stacktrace line numbers without the source (AFIAK we can't)?
What is the best practice for local builds? Do we need the source code?
What about CI?
Can we leave the source code only for production release?
Thanks,
Omer
It's good practice to also publish the sources jar along with your binary jar in your internal (or external) Maven repository. It makes life of the developer that is working with your code much easier since they can see your comments / browse the codebase and be able to have all that at debug time. Now as you are saying even if the sources jar is not published, developers have ways around it primarily relying on their IDE. In Eclipse for instance you can install the Java Decompile plugin that would give you access to the code during debug time or on IntelliJ there is something similar without the need of installing a plugin.

How to properly configure Eclipse project in IntelliJ? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to import an Eclipse project from GitHub into IntelliJ. I'm however having problems figuring out the correct way of doing that.
I'm following this question to do the importing(I'm leaving everything on default and simply click "Next", since the answer doesn't mention anything else and I have no idea what the other stuff does), but it still doesn't work. The configuration/project structure appears to be seriously broken and I have no idea why.
More exactly, I'm currently stuck at the following screen: The "Problems" tag explains in more detail that both the things in red are "invalid". I tried searching for that error, but it seems that people encounter it on all different project models and build tools like Maven, Spring, or Android. None of them concern Eclipse projects and the solutions vary from issuing a bunch of commands that I don't understand somewhere to deleting this project file or another.
Since there are so many unknowns in play here, I decided to ask, rather than waste days crapshooting only to break something in my IDE or Java installation. How do I get this project to work? It's a simple local machine visual app, it shouldn't be this complicated to import it in an IDE.
Basically the issue is how those two libraries are defined. If you select one and then click on the edit button to the right, a dialog will open and show the path to where those libraries are defined. They are likely configured to find the necessary JARs at a specific path on the (original developers) system. For example, for the jfxrt.jar library, maybe it is configured that the classes/binary JAR is at C:\Program Files\Java\JavaFx\jfxrt.jar or C:\Users\Bob\libs\fx\jfxrt.jar. Wherever they are defined, you either need to put the necessary JARs in that directory, or modify the config to point to the location on your system where you have the JARs. This of course may require you to download the necessary JARs.

how to use a processing library in eclipse? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying to play an audio file in a java program I have written in Eclipse. Processing has a very good library for playing audio files which I would like to use in Eclipse. I have followed and completed the directions in this link:
https://processing.org/tutorials/eclipse/ to be able to write Processing java code in Eclipse. I am unclear how one goes about downloading and using Processing libraries in Eclipse. All ideas and links explaining how to download and use this java library: https://processing.org/reference/libraries/sound/index.html in Eclipse would be much appreciated! Thank you for your help!
You'd follow pretty much the same steps- add the library jar(s) to your classpath, and then use the classes in those jars.
For example, if you want to use the Processing library minim, you would simply download the zip file, and then extract the jars within to whatever directory you want. Then you'd right-click your project in eclipse, go to properties, then Java build path. Go to the libraries tab, then just select the minim jar(s) to add them to your classpath.
Then you can use the minim classes just like you can use any other Java library.

Categories

Resources