Hot answers tagged

13

Vim supports transparently editing files inside zip files. Just execute: vim file.zip and you will be shown a list of files inside zip archive. Choose the one you want to edit, change what you want, and exit with :x


11

I'm not certain what you mean by "manual file deleting", but here's how to delete the META-INF folder. You must open minecraft.jar in a program which can edit .zip files (such as 7-zip), then delete the META-INF folder as you would anything else. This should not require administrator privileges, as minecraft.jar resides inside your home folder, over which ...


8

Do you know the name of the file in the archive before unzipping it? You could make a function to unzip to /tmp, edit, and refresh the zip: zipedit(){ echo "Usage: zipedit archive.zip file.txt" unzip "$1" "$2" -d /tmp vi /tmp/$2 && zip -j --update "$1" "/tmp/$2" } As it says, usage is: zipedit myarchive.zip myfile.txt This ...


5

By default, Windows 7 doesn't think .jar is a zip file that it can open, so doesn't enumerate its contents. You can fix this with the following registry addition: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.jar\PersistentHandler] @="{3B224B11-9363-407e-850F-C9E1FFACD8FB}" Either paste that into a text file and save as fix.reg, then open it ...


5

zip -u stuff.jar file.txt will update file.txt in stuff.zip . Note that for -u file.txt must already exist in the zip file, and will only be overwritten if it's newer than the one in the jar.


4

what about this one jar -uf YOURJAR.jar FILE if the jar have a folder structure, you can keep that too jar -uf YOURJAR.jar DIR/DIR/FILE Look this one for more information http://docs.oracle.com/javase/tutorial/deployment/jar/update.html


4

I tried exporting HKEY_CLASSES_ROOT\.zip, changing all references of '.zip' to '.jar' and importing it to HKEY_CLASSES_ROOT\.jar. Under Vista at least it let me open a .jar file as if it were a .zip.


4

In two steps: Open Explorer, right-click an .rcq file and choose Open, then Select from list, choose java.exe and click OK after checking "Always use the selected program". Still in Explorer, open Tools -> Folder options, File types tab, click on .rcq in the list, then Advanced. Click on Open, then Edit, and add the additional parameters to the displayed ...


4

To make it easy for others to run the JAR installer without having to make changes to all their computers, you'll probably want to wrap it with a batch script that elevates and runs the JAR file. You can do this easily with the Elevation PowerToys from Microsoft. They include a useful utility that lets you launch anything as administrator by simply ...


4

In addition to Ben Blank's answer, if you cannot install a zip application as you do not have administrator rights, you could just rename mincraft.jar. As a .jar file is just a .zip file under another name, and if you are using Windows, which can now open .zip files as if they were directories, you can just rename minecraft.jar to minecraft.zip. You can now ...


4

Your problem is how you use the start command. By putting the first parameter into "" you assign that as the title of the window for the started program. Then you pass %1 into it (which you noted in the comments of your question). %1 is the filename of the .myext file you clicked. So that is the file start tries to execute. Which results in the error ...


3

One possibility is MicroEmulator : This is Java 2 Micro Edition (J2ME) CLDC/MIDP Emulator. Allows demonstrate MIDlet based applications in web browser applet, also can be run as standalone java application. MicroEmulator is a pure Java implementation of Java ME in Java SE. MicroEmulator is licensed under LGPL so it is possible to link ...


3

You might be able to create a batch file to run the java program. @echo off java filepathto.jar However if the java program can not be run without any user input it would be useless.


3

Schedule java.exe or javaw.exe instead, with the following command-line arguments: javaw -jar myfile.jar (On Windows, java is for console-based programs while javaw is for graphical ones.)


3

What you need to do is associate the JAR extension in Windows Explorer with Compressed folders. From Windows Explorer select tools / Folder Options. Then the Files Types tab. Select New and associate JAR Compressed (ZIP) Folder.


3

The first thing I did was make sure I had the latest Java SE and that the .JAR file association was with Java and not something else (like WinRAR) I had to do something similar to get another application to pin to taskbar I use so I knew it had something to do with targets, and after researching a bit the same method for Windows 7 works here. Create a ...


3

However after selecting a file (eg. AbstractComponent.class) and press Enter, within vim I get: caution: filename not matched This is probably a known bug in vim's ZIP plugin - the plugin does not properly handle ZIP files that contain ZIP comments. See e.g. this mailing list post As a side note, I also noticed that if I extract the jar ...


2

Create a shortcut. Move the shortcut into C:\ProgramData\Microsoft\Windows\Start Menu\Programs. Then click on the start menu and drag and drop your newly added icon wherever you like. Works on my copy of Windows 10 and avoids the CMD Window.


2

Searching inside jar files: find . -name \*.jar -exec sh -c 'printf "\n\nFile: {}"; jar tf {}' ";" | less +/foo And similar with war files: find . -name \*.war -exec sh -c 'printf "\n\nFile: {}"; unzip -l {}' ";" | less +/foo Change foo with text of your interest (such as abc.png). You can press: n to search for the next pattern match. Shift+n to ...


2

Tools | Options | File Associations | Look for JAR | Advanced Options | Edit the "open" action and use: "C:\Archivos de programa\Java\jre6\bin\javaw.exe" -jar "%1" %* well "C:\Program Files\Java\jre6\bin\javaw.exe" -jar "%1" %* by example, it depends on your JRE location


2

jar or exe are just containers and may contain anything, so yes, you should be careful ... I wouldn't say that it's impossible to remove afterwards, but if you don't trust the publisher run some tests before you touch it ...


2

If someone really wanted to do something like this, they could theoretically use the exe to install and start multiple services, all of which check for the existence of all the rest in an endless loop while performing whatever maliciousness they desire. If any of the others are stopped or removed, the remaining would repopulate the one that was missing. ...


2

I've just had occasion to do this, and found that the easiest way, without having to download and install Elevation PowerToys, was to run cmd.exe as an administrator and then call java.exe -jar 'installer.jar' from the command line. Of course, I had to find java.exe first, but that didn't take long...


2

A slightly roundabout way would be to download this Batch to EXE converter, use it to convert anzenketh's batch file to an exe with the setting Invisible Application, and including the jar file. This way you could directly tell task scheduler to run the resulting exe, and you would only have one exe to keep track of instead of the jar and the bat.


2

What you are looking for is a J2ME emulator, there are many of them and it appears that many have some limitations such as limited 3D support, slowness and other bugs. There is Micro Emulator which according to this site can run Opera Mini and is an indication that it is reasonably complete. I also found Java Emulator which looks to be more game ...


2

No, you cannot package/install a .jar file. Java requires the Java Runtime Environment to run programs. You must have that installed on the client in order to run a .jar (Java executable) file. Install the Java Runtime Environment on your client, copy the .jar, and run java -jar /path/to/file.jar.


2

One good reason is that if you remove something from a jar, you risk breaking dependencies of other classes in the jar. But, I agree that this is babying a user who may know what can safely be removed. You can work around this easily enough by renaming the jar to a .zip file and manipulating it with your favorite .zip editor (Windows File Explorer will do ...


2

Problem You have your command set to this: @="C:\\...\\run.exe %1" Spaces are delimiters and used to separate different parts of a command and its arguments. If you had no spaces in the filenames, then it would work: C:\Foobar\run.exe c:\test.myext If have spaces in the file (or its path) being passed, the program may or may work correctly depending ...


1

According to the man page for zip (online version for easy reference: http://linux.die.net/man/1/zip), the zip command has a -u flag which it describes as: Replace (update) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive.



Only top voted, non community-wiki answers of a minimum length are eligible