aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Jobfuscate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Jobfuscate" Watch "Jobfuscate" New topic
Author

Jobfuscate

sri vidhya
Greenhorn

Joined: Oct 03, 2007
Posts: 6
In order to hide my source code, i used Jobfuscate. I cant see the source code by decompilation. so it is working perfectly. but i couldn't execute the class file. Please help me in this sanerio.
[ October 04, 2007: Message edited by: sri vidhya ]
bart zagers
Ranch Hand

Joined: Feb 05, 2003
Posts: 234
I have no idea what could be going wrong, but wanted to ask what you are trying to achieve with this obfuscation?
Are you aware that it only makes it more difficult for someone else to read your code, but does not actually prevents this (see this thread for a longer explanation).
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
Welcome to JavaRanch.

so it is working perfectly.


I guess not?

You can make it easier for people to help you if you tell us what actually happens when you try to run the program - are there error messages? TellTheDetails

My guess would be that you inadvertently obfuscated the name of the class you use to start the application, or the name of its main method.


Ping & DNS - my free Android networking tools app
sri vidhya
Greenhorn

Joined: Oct 03, 2007
Posts: 6
Please Explain the method to jobfuscate the class file. i need step by step explanation
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
Which product is it you're talking about - this one? Its instructions seems rather clear on what you need to do in order to run it, and how to exclude certain methods/classes from obfuscation (not that you have told us what exactly the problem is).
sri vidhya
Greenhorn

Joined: Oct 03, 2007
Posts: 6
Yes i used bellow link for obfuscate my class file

http://www.duckware.com/jobfuscate/index.html

Step:1 created java file "example.java"
step:2 compiled that java file, so class file is created("example.class")
step:3 gave the command "jobfuscate example". so it obfuscated the class file.
step:4 then executed the class file by giving command "java example"
stpe:5 I got the error classFormate error.

These are the step i followed

please explain it if i made any mistakes
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53

stpe:5 I got the error classFormate error.

That's the kind of thing people need to know in order to help you. What is the exact and complete error message?
[ October 04, 2007: Message edited by: Ulf Dittmer ]
sri vidhya
Greenhorn

Joined: Oct 03, 2007
Posts: 6
C:\application>jobfuscate ex > exa.class

C:\application>java exa
Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value
1330526752 in class file exa
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

please see this method and error i am getting.. give me solution
krishnamoorthy kitcha
Ranch Hand

Joined: Feb 04, 2006
Posts: 96
Hi sri vidhya


Check with class file had corrupted or else , using version mismatch in your jdk version.

Check and tell me your exact problem you were facing.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
Are you certain that jobfuscate writes the class to standard output, so that you can pipe it into a file? That would be very strange, and the documentation doesn't mention anything like it. To the contrary, the documentation shows an example where the output is piped to a .log file, indicating that it's not the class itself (which wouldn't work with multiple classes anyway).
sri vidhya
Greenhorn

Joined: Oct 03, 2007
Posts: 6
In the document, there is no explanation given for how to run the jobfuscate file. Thats why i am asking for how to execute the jobfuscate file.
Please give me step by step method to use jobfuscate.
I am using jdk1.5 version.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
In the document, there is no explanation given for how to run the jobfuscate file.


Sure there is. The "Using Jobfuscate" section contains several examples of how to run it from the command line, and the "Jobfuscate Command Line Options" section explains the options you can (and need to) use.
 
Consider Paul's rocket mass heater.
 
subject: Jobfuscate