android - Can we set #define or #ifdef for java in eclipse IDE -



android - Can we set #define or #ifdef for java in eclipse IDE -

this question has reply here:

#ifdef #ifndef in java 7 answers

i want add together #define of #ifdef in eclipse java.so can disable or enable code while building specific target.

i have used c++ before don't know there way in java eclipse project.

please allow me know if possible or not in eclipse.

no, java has no preprocessor, , because scenario describe should not occur in java.

one of java's original main design ideas (if not the original design idea) coined "write once, run everywhere". means don't compile different bytecode different platforms. instead, there's 1 bytecode applied on every platform.

thus, there's no need preprocessor instructions, because scenario should not necessary. if sense need different code on different platforms, there ways accomplish this, not through preprocessor macros. maybe more specific on issue, can propose suitable solution in java.

java android eclipse ifdefine

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -