How to Ofuscate my class file?
I just want to make my class files hard to decompile. Could somebody help me in Ofuscation? I am not getting any resourse. Please suggest some easy-to-understand ways.
Here is free obfuscator - yGuard: http://www.yworks.com/en/products_yguard_about.htm
Here is the commercial one - Allatori: http://www.allatori.com
And, of course, google knows much more other obfuscators :)
Similar Messages
-
How to convert java class file version without decompiling
Hi,
Oracle R12.1.3 i am having illegal access error while try to access the class file version Java 1.3 uses major version 47,So how to convert the class file version without using decompiling.
Current java version is 1.6.0_07
Is there any tool or API for converting class file version?
Thanks,
Selvapandian TBeside this I wonder where you get your error from since AFAIK 12c comes with java 1.6.
Well wonder no more!
OP isn't using Oracle 12c database.
They are using Oracle R12.1.3 - which is the E- Business Suite. -
How to convert a class file to exe file and how to cteate a class file to d
how to convert a class file to exe file
Hi Bhaskarq,
Hi,
It is not at all possible.
But it is a really worst method.
Please go through it.
This is a very common question asked in the comp.lang.java newsgroup. Its often useful to have an
executable application when deploying your
applications to a specific platform, but remember to
make your .class files available for users running
Unix/Macintosh/other platforms.
Microsoft provide a free system development kit (SDK),
for Java, which includes the jexegen tool. This
will convert class files into a .EXE form. The only
disadvantage is that users need a Microsoft Java
Virtual Machine (JVM) installed. If your target
platform is Win32, you can either redistribute the
virtual
machine, or raise the level of your system
requirements, to include Windows 98, or Windows 95
with
Internet Explorer 4. Systems matching these
requirements will already have a copy of the Microsoft
Java Virtual Machine installed.
Note : You must specify all of the class files your
application needs (except for standard java packges)
as a parameter, so if you have third party libraries,
you'll need to include them as well. You can use wildcards * though, and you don't need the original source code.
Also please see this Forum which will give a good idea
http://forum.java.sun.com/thread.jsp?forum=31&thread=149733
I hope this will help you.
Thanks
Bakrudeen
Technical Support Engineer
Sun MicroSystems Inc, India -
How to get the .class file for the extended Controller .java file
Hi,
I did the below steps.
1. Created New OAWorkspace
2. Created New project
3. Imported the page .xml file
4. Added new .java file by extending the controller class
5. Added code in the .java file.
6. Ran the .xml file
As I copied all the folders from Unix box, the page was opened.
But My question was where can I see the .class file the extended controller. It's a .java file. How to compile and get the .class file for this .java file. If I get this .class file, I can go to the page and click the personlize page. and change the Controller name to the new path by ftp ing the new class to the cust.oracle.apps.pos.changeorder.webiui.
Please let me know how to create the .class file.
Thanks,
HPAll are Java files are stored in JDEV_INSTALL_DIR:\jdevhome\jdev\myprojects\
In your case the path java would be
JDEV_INSTALL_DIR:\jdevhome\jdev\ myprojects \cust\oracle\apps\pos\changeorder\webui\
AND
Once you compile the java file in Jdeveloper, Class files get generated @ below path
In your case the path of class would be
JDEV_INSTALL_DIR:\jdevhome\jdev\ myclasses \cust\oracle\apps\pos\changeorder\webui\
Duplicate Thread-
Thanks
--Anil
http://oracleanil.blogspot.com/ -
How to decode java class file to java file
hi
how to decode java class file into java file
regards
kedarIts really.......... really BAD.
Write ur own code... or use open source code..
Its a bad practice...
however i am telling u ..there is DJ java decompiler.
but mind it there are Obfuscator also....like codeshield and others
take care...
Alok -
How to edit a ".class" file? Anyone?
I hope someone can help me with this...
Someone gave me a class file to put into my applet. However, I'm wanting to go into the class file and change a few things around. However, I've done just about everything to try to find a way to go into the code of this file to do some changing, and I can't find anything to do it with! I've tried Netbeans and Visual Studio .NET, but it doesn't work. Maybe I'm doing something wrong. Does anyone know how to go into the class file and change it?
thanks soo much..Someone gave me a class file to put into my applet.
... Does anyone know how to go
into the class file and change it? And why can't you ask "someone" for the source? Or ask them to modify it for you? -
How to call a class file in a jsp without deploying anything in j2ee
Hi,
I am new in J2EE. I have some jsps, which I configured using web.properties(documentroot=c:/jsp/). I am able to get
those pages by the web browser. I have some import statements in some jsps, now I
am trying to access those page but it is failing, it says
org.apache.jasper.JasperException: Unable to compile class for
JSPD:\j2sdkee1.3\repository\pradip\web\_0002fLogin_0002ejspLogin_jsp_0.java:1:
Class com.gui.UPMGuiGlobalConstants not found in import.
import com.gui.UPMGuiGlobalConstants;
Actually I have not deployed any class file or jsps.. Now my question is can I access
these jsps without deploying anything, like can I put my .jar file in any j2ee
directory(like lib or anywhere else, I already tried after putting in /lib) and restart the
j2ee and use it. So how can I call a class file from a jsp without any kind of
deployment?
Please send me the reply as soon as possible.
Regds,
PradipAfter you put the jar containing the class to import into the WEB-INF/lib directory, you still need to include it in the jsp.
Putting the jar into the lib dir, will make it available to the vm, but as in any other java class, you still need to import it into the class, that the jsp will be compiled into.
And you do that by putting
<%@page import="com.gui.UPMGuiGlobalConstants" %>somewhere near the top of your jsp. (well you don't need to put it there, but it good style ;)
That should do it. -
Hi Everybody,
I want to convert back a .class file (a compiled servlet) into .java (source code) file. How do I do it???
Note using javap has not been of any help.
Thanks in Advance
RajibWhy don't you look at this thread:
http://forums.java.sun.com/thread.jsp?forum=31&thread=143500
If thats not enough, try searching all the forums for:
"convert .java .class" That'll give yu a bunch of other threads...
Sjur -
How to access a class file outside the package?
created a two java files Counter.java and TestCounter.java as shown below:
public class Counter
public void print()
System.out.println("counter");
package foo;
public class TestCounter
public static void main(String args[])
Counter c = new Counter();
c.print();
Both these files are stored under "D:\Test". I first compiled Counter.java and got Counter.class which resides in folder "D:\Test"
when i compile TestCounter.java i got the following error message:
D:\Test>javac -classpath "d:\Test" -d "d:\Test" TestCounter.java
TestCounter.java:6: cannot find symbol
symbol : class Counter
location: class foo.TestCounter
Counter c = new Counter();
^
TestCounter.java:6: cannot find symbol
symbol : class Counter
location: class foo.TestCounter
Counter c = new Counter();
^
2 errors
what could be the problem. Is it possible to access a class file outside the package?ya that's fine..if we have two java files where both resides in the same package works fine or two java files which donot have a package statement also works fine. But my doubt is, i have a Counter.class which does not reside in a package and i have a TestCounter.class which resides in a package "foo", in such a scenario, how do i tell to the compiler that "Counter.class resides in such a path, please look at that and give me TestCounter.class". i cannot use import statement to import Counter.class in TestCounter.java because i donot have a package for Counter.java.
-
How to include a .class file in a jsp page
hi everyone,
i know the syntax as:
<%@ include file = "filename.class" %>
then at run time the server could not find the class file
if i use,
<%@ page import = "FileName.class" %>
then also the same problem persists
& if i use
<jsp:include page = "Relative address"/>
the problem still remains as it is...
please help me out...i am working on developing an EJB application in which client interacts with server's Stateful session bean through a jsp page...it is necessary for me to include the home interface class file in my jsp page.
P.S. do not suggest me to include the class file in a package & then use
<%@ page import = "packageName.ClassFileName" %>
i
Edited by: Ankit_JIITU on 6 Jul, 2008 1:55 AMAnkit_JIITU wrote:
i have already included the remote interface class file by <%@ page import = "University.RemoteInterfaceName" %>in my jsp page ...
if i try to make a new package called test & then include my home interface in that package...i need to import University.*to generate the class file of my home interface ; but the class file generation is not taking place as i am getting the error..
"package University does not exist".How can i overcome this problem. The package University, which you are trying to import, must be in the classpath. If you removed it then you will have to add it back.
i have tried my best..but tell me if there's any possible way of including a class file in the jsp page without involving a package.No, there isn't.
If not,then pls help me to generate the class file of my home interface within a package called test.Read the New To Java Tutorial and understand how packages work.
>
i am assuming that u have a deep knowledge of developing EJB applications. -
How to Load a class file base on .class file name???
Hi,
Can anyone help me?
1) Based on filename (d:\temp\bla.class), I want to load this bla.class and get the actual package of this class.
example:
package something.temp;
public class bla
I want to load the file base on filename and get the package of the class. Is it possible ?
Thank you.Hi nikki96,
It will not work. I will get java.lang.NoClassDefFoundError eventhough I extends classloader to use the findClass(String filename);
Example:
import java.security.*;
import java.util.Enumeration;
import java.util.NoSuchElementException;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import sun.misc.Resource;
import sun.misc.URLClassPath;
public class MyURLClassLoader extends ClassLoader
String host;
int port;
public Class findClass(String name)
try
byte[] b = loadClassData(name);
return defineClass(name, b, 0, b.length);
} catch(Exception e)
e.printStackTrace();
return null;
private byte[] loadClassData(String name) throws Exception
// load the class data from the connection
File file = new File(name);
InputStream is = new FileInputStream(file);
long length = file.length();
// You cannot create an array using a long type.
// It needs to be an int type.
// Before converting to an int type, check
// to ensure that file is not larger than Integer.MAX_VALUE.
if (length > Integer.MAX_VALUE) {
// File is too large
// Create the byte array to hold the data
byte[] bytes = new byte[(int)length];
// Read in the bytes
int offset = 0;
int numRead = 0;
while (offset < bytes.length
&& (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
offset += numRead;
// Ensure all the bytes have been read in
if (offset < bytes.length) {
throw new IOException("Could not completely read file "+file.getName());
// Close the input stream and return bytes
is.close();
return bytes;
Problem: The class file is not in the proper package (d:\temp\bla.class) where the proper package is d:\something\temp\bla.class.
Objective: I just want to base on the bla.class (no matter where is it located), then get the package of the classfile (bla.class) like example something.temp.
Simple as that but I don't know how to do :(. -
How to load a .class file dynamically?
Hello World ;)
Does anyone know, how I can create an object of a class, that was compiled during the runtime?
The facts:
- The user puts a grammar in. Saved to file. ANTLR generates Scanner and Parser (Java Code .java)
- I compile these file, so XYScanner.class and XYParser.class are available.
- Now I want to create an object of XYScanner (the classnames are not fixed, but I know the filename). I tried to call the constructor of XYScanner (using reflection) but nothing works and now I am really despaired!
Isn't there any way to instantiate the class in a way like
Class c = Class.forName("/home/mark/XYScanner");
c scan = new c("input.txt");
The normal call would be:
XYLexer lex = new XYLexer(new ANTLRFileStream("input.txt"));The problem using reflection is now that the parameter is a ANTLRFileStream, not only an Integer, as in this example shown:
Class cls = Class.forName("method2");
Class partypes[] = new Class[2];
partypes[0] = Integer.TYPE;
partypes[1] = Integer.TYPE;
Method meth = cls.getMethod("add", partypes);
method2 methobj = new method2();
Object arglist[] = new Object[2];
arglist[0] = new Integer(37);
arglist[1] = new Integer(47);
Object retobj = meth.invoke(methobj, arglist);
Integer retval = (Integer)retobj;
System.out.println(retval.intValue());Has anyone an idea? Thanks for each comment in advance!!!Dump all of your class files into a directory.
Use the File class to list all files and iterateover
the files.NastyNot really, when you are dynamically creating code, I would expect the output to be centralized, not spread out all over the place.
>
Use a URLClassloader to load the URL that isobtained
for each file with file.toURI().toURL()(file.toURL()
is depricated in 1.6)Wrong, the URL you give it must be that of the
directory, not the class file.No, I did this quite recently, you can give it a specific class file to load.
>
Load all of the classes in this directory, thatway
any anonymous classes are loaded as well.Anonymous classes automatically loaded when the real
one isIt can't load it if it doesn't know where the code is. Since you haven't used a URL classloader to load once class file at a time, you would never encounter this. But if you loaded a class file that had an anonymous classfile it needed, would it know where to look for it?
>
From this point you should be able to just get a
class with Class.forName(name)No. Class.forName uses the classloader of the class
it's called in, which will be the system classloader.
It won't find classes loaded by a URLClassLoader.got me there. -
How to put the ".class" file in Memory with Javac?
The J2SE 6 RC have an tool : javax.tools.JavaComplier. I can use it to compile the source code in memory( I implemented an JavaFileObject).
But the compiler aways put the output file(.class) to file system. It;s not my want to do . I am writing an IDE ,I use javac to determine the code error after the user's typing. So complier is used a lot , writing to file system is a time consuming job.
I also want to use the byte code(".class" file) for reflection , so if the JavaCompiler can put the output file in memory and then I can reflect it.
My current solution is puting the output file to file system then use Class.forName() to reload it in memory then reflect it. It seems a useless IO operation with file system.
How can I do with it?
Thanks!Those 'useless' I/O operations are one or two out of thousands that are implied by compiling a Java source file.
I wouldn't worry about it. -
How to use/call .class file in jdeveloper
I have a .class file that is run as part of cron job on the UNIX server. It has three parameters - so the call goes something like this java exampleClass1 param1 param2 param3.
I need to import it into my Jdeveloper project so it can be called from a web application. Please help.
I tried importing the directory as a library(was I supposed to jar it first?) and updated classpath to use the directory with this class file too. But in my code...how do I call exampleClass1?If the exampleClass1 does have a public method which is called from the main method, when you run it from the command line
should work like this
// sample class
public class ExampleClass1
// C'tor
public ExampleClass1 ()
public void testmethodWith3Params(String aS1, String aS2, String aS3)
// do the work here
public static void main(String[] args)
String p1;
String p3;
String p3;
ExampleClass1 xyz = new ExampleClass1();
// read the params into p1,p2 and p3
// omited the code
// call the worker method
xyz.testmethodWith3Params(p1,p2,p3);
// now instead to call the main method you call the workter methos from your web app like
ExampleClass1 aaa = new ExampleClass1 ();
aaa.testmethodWith3Params(param1, param2,param3);
...If you don't have a method (or don't know it) you can call it via the main method like
String [] param= {p1,p2,p3};
ExampleClass1.main(param);Timo -
How to uncompile a .class file?
I have a servlet class file. I want to know how to uncompile into into a .java file. I tried javap command but that showed a "No source" message. Any clues?
u can download freeware from the web that can decompile class files to their .java files. The problem with that is that if an abfuscator is used to hide the variable names, then the variable names in the obtained class file will have no meaning.
Maybe you are looking for
-
Photoshop Elements 6 Freezing, I need help, please.
I got the program along with the Wacom Tablet I got, not too long back. It worked for a while, but then started freezing at random moments. But now, I can never open it without it freezing about 30 seconds after launch. I checked the FAQ's and Troubl
-
Problem with removing items from a linked list
Hello, I have something weird going with my code. Below is the snippet if (ParserDataList.isEmpty()) try { Thread.sleep(10) catch (InterruptedException e) { else data = ParserDataList.remove(); ParserDataList is declared as a LinkedList. Occasionally
-
There is a problem with this website's security certificate. This error message happens on every page. Please help!!!
-
Can we write the select statement on maintence view for data retreval
Can we use the select statement on maintence view Regrads Diva
-
Cash Flow Report (FSI3/FSI5) pulling double value
Dear SAP Experts I am creating a Cash Flow Statement via FSI3 /FSI5. While selecting key figure "Total Credit Postings" system is pulling the double values for the assigned GL. Please see below; Please see the output. GL total credit value is 269610.