How to change already compiled .class file without decompile?


Question I want to change .class file's method. I installed JD Eclipse Decompiler and opened the .class file. I added some codes and save .class file. But, .class file is not changing. I don't know how to use decompiler. And if is it possible, how to change .class file without using decompiler. I am using Ubuntu. Regards EDIT: Here is my decompiled code: /* */ package org.hibernate.id; /* */ /* */ import java.…
Read more ⟶

How to prepend a path to sys.path in Python?


Question Problem description: Using pip, I upgraded to the latest version of requests (version 2.7.0, with pip show requests giving the location /usr/local/lib/python2.7/dist-packages). When I import requests and print requests.__version__ in the interactive command line, though, I am seeing version 2.2.1. It turns out that Python is using the pre-installed Ubuntu version of requests (requests.__file__ is /usr/lib/python2.7/dist-packages/requests/__init__.pyc -- not /user/local/lib/...). From my investigation, this fact is caused by Ubuntu's changes to the Python search path (I run Ubuntu 14.…
Read more ⟶

How do I use shell script to check if a bucket exists?


Question I have aws cli installed. I'm just not sure how to do this in shell script. when I run command aws s3 ls s3://bucket it would give me something like this A client error (NoSuchBucket) occurred when calling the ListObjects operation: The specified bucket does not exist That means the bucket doesn't exist. So I want to run that from shell script and check if grep finds it. But my command doesn't work.…
Read more ⟶

Installing IDEA on Ubuntu 11.10


Question I am trying to install IDEA on Ubuntu 11.10. First, I installed openjdk-7-jdk. Then I tried running the idea.sh file as instructed. However it complains: ERROR: cannot start IntelliJ IDEA. No JDK found to run IDEA. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation. Press Enter to continue. Trying to echo these three variables prints an empty line to the screen. How (and to what values) do I set these variables and proceed with the installation?…
Read more ⟶

scp host key verification failed for remote to remote copy [closed]


Question Closed. This question is off-topic. It is not currently accepting answers. </div> Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 years ago. Improve this question scp foo user@remote:bar works fine scp user@remote:foo bar works fine scp user@remote:foo user@remote:bar fails with error: Host key verification failed. lost connection I am guessing this is because scp disallows remote to remote copy (between two different remote hosts or the same remote host) because it is inefficient to channel the data from point A to point L to point B rather than directly from point A to point B.…
Read more ⟶

Unable to run Java GUI programs with Ubuntu


Question I am learning GUI in Java, and for that I have created a demo program: import java.awt.*; public class FrameDemo extends Frame { public FrameDemo(){ super("Frame Demo"); setSize(200, 200); setVisible(true); } public static void main(String args[]){ new FrameDemo(); } } It was compiled successfully. But when I tried to execute the program, I found the following error: Exception in thread "main" java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173) at java.awt.Window.<init>(Window.java:437) at java.awt.Frame.<init>(Frame.java:419) at FrameDemo.…
Read more ⟶

How to deploy a docker container on a remote ubuntu server?


Question I have implemented an API inside a docker container and I want to deploy this container to a remote ubuntu server. How can I do that exactly? My API uses many resources and I have used MLDB framework to implement it. I want to deploy the container containing the API on this remote ubuntu server. So far, I have found many guides to deploy the API on AWS and DigitalOcean, but since I already have access to a remote ubuntu server than I don't need those right?…
Read more ⟶