Win a copy of Securing DevOps this week in the Security forum!

Susilo Saja

Ranch Hand
+ Follow
since May 27, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Susilo Saja

Originally posted by John Meyers:


Yes , your eclipse compiler config should have had the "Generate line number attribute table" option on and if you run it without recompiling with javac you should get the same result. The -g flag in javac will generate all the debugging info and write it into the class files. Either way Its the same line number in my opinion.



I've already had the "Add line numbers to generated class file" checked. If it's not checked, it will give me -1. No, it's not the same line number if I compile it using eclipse and javac. It will be the same though if I dont separate the line.

So what made it different is the compiler. I thought it's the jvm.
Is it possible to make eclipse compiler behave the same way like javac for the line numbers ?

Regards,
Susilo
11 years ago
I have this code :



When I run it in eclipse 3.2 , lineNum gave me the number of the line below, which is :



While if I run it on the command prompt (on Windows), it gave me the number of the line above :



I've tried to use the same jdk for both environment, also tried using both java 1.4 and 1.5 on both environment, and whatever java version I use does not seems to affect the result.

Any clue on why this happened ?

Regards,
Susilo
11 years ago
Hi,

I know Maven provide us jars from Maven Repository.
I was looking for a way to reference our own jar.

Regards,
Susilo
11 years ago
Hi,

Using Raven , the default target for compile is target/classes.
Has anyone managed to change the target directory ?

Regards,
Susilo
11 years ago
I've found Raven, which is based on Rake and specifically made to build Java app.
But I was looking to do it without Raven, only Rake.

Regards,
Susilo
11 years ago
Hi guys,

I'm trying to learn how to build Java project with Rake.
I'm new to both Rake and it's language, Ruby.
And I'm having a lot difficulties finding tutorial on that.
I can't even find how to do a compile.
Some tutorial on Rake or Ruby only pointed out how to build C.
Can someone give me direction?

Regards,
Susilo
11 years ago
Ok , thanks! I'm going to look at those.
11 years ago
Hi guys ,

I dont know much about building tools beside Ant.
Do you guys have recommendation for other building tools?
Or probably tools that make creating ant script easier.

Regards,
Susilo
11 years ago
I just found a similar thread to mine. It answered how to get mac address.

http://www.coderanch.com/t/376662/java/java/unique-address

Thanks for the help!

Regards,
Susilo
12 years ago
On second thought , I just realize that most of the pc now have built-in ethernet on the motherboard. So using MAC address might work. How can I acquire the MAC address using Java code?

Regards,
Susilo
12 years ago
Well, I can't use no 1 because I don't intend to track who leak my code. All I care is how to make it hard to copy.

And since a lot of my users won't be on a network, I also can't use no 2 and IP address scheme. I can't even be sure whether my user will have MAC address since I can't make sure they will have ethernet card.

I'm thinking about other number from the hardware. Is there a unique number from the motherboard, for example ?

Regards,
Susilo
12 years ago
Yeah I guess it's not so hard anyway to install Java.
Thanks guys!

Regards,
Susilo
Hi,

Can you tell me some ways to at least make it harder?
Yeah I need to consider whether the inconvenience is too much for the genuine users, then decide whether to use it or not.

Regards,
Susilo
12 years ago
If I only need to include the jar file to use hsqldb, that is much better.
Do I need to start the service like the other database?
Can it be called by client from another pc ?

I am planning to convert my application to exe, maybe using exe4j.
I haven't do a lot of experiment, but my prediction is that I don't have to install jre to run the exe.
That's why I try to avoid having to install jre at all.

Regards,
Susilo
Hi,

Thanks for the reply. I've tried to look at hsqldb, and the problem for me is that we have to install java in order to use it.

I prefer not to have to install Java, because I am going to deploy my application (swing application) on a lot of client. I prefer an one-click install to deploy it, while if using hsqldb, my prediction is that it's gonna take more effort. That's why I'm thinking of using flat-file, because we don't have to install any database engine. Please correct me if I'm wrong.

Regards,
Susilo